1,因為python2.7的安裝目錄下面C:\Python27\Scripts,沒有pip,使用easy_install pip安裝各種報錯。
所以最終下載了pip-20.2.4.tar.gz原始碼包安裝,安裝起來也簡單,解壓后
python setup.py build
python setup.py install
順利沒有報錯,這時看Scripts目錄下面多了pip.exe
2,使用pip install virtualenv又報錯
c:\Python27\lib\site-packages\pip-20.2.4-py2.7.egg\pip\_vendor\urllib3\util\ssl_.py:142: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecurePlatformWarning,
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=100.0)",)': /simple/flask/
3,百度找到了解決方法,使用國內的鏡像源,成功。
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple virtualenv
4,之后創建虛擬環境
C:\Python27>Scripts\virtualenv.exe tongbao
uj5u.com熱心網友回復:
安裝MySQLdb又報錯。pip instal pip install MySQL-python 失敗。只能下載MySQL_python-1.2.5-cp27-none-win_amd64.whl,執行
pip install MySQL_python-1.2.5-cp27-none-win_amd64.whl 安裝成功。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/224592.html
