換源
pip.ini (此文件需放置在個人文件目錄下的pip文件夾下)的內容:
linux 放置路徑為 ~/.pip/pip.conf
[global]
index-url = https://mirrors.aliyun.com/pypi/simple
trusted-host = mirrors.aliyun.com
disable-pip-version-check = true
timeout = 120
[list]
format = columns
清華源https://pypi.tuna.tsinghua.edu.cn/simple
虛擬環境
關于報錯
& : 無法加載文件 C:\Users\username\project_name\venv\Scripts\activate.ps1,因為在此系統上禁止運行腳本。有關詳細信息,請參閱 https:/go.microsoft.com/fwlink/?LinkID=135170 中的about_Execution_Policies。
在管理員權限下的powershell中執行 set-ExecutionPolicy RemoteSigned
然后選擇Y