目录
- 1、pip : 无法将“pip”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
- 2、pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out
- 3、问题解决-ERROR: Could not install packages due to an OSError: [WinError 2] 系统找不到指定的文件。
- 4、ERROR: Could not find a version that satisfies the requirement pymysql (from versions: none) ERROR
1、pip : 无法将“pip”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
解决方案:
环境变量的path里新增Python-sciprt文件夹的路径
2、pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out
问题原因:下载超时,安装时加上超时时间就可
解决方案:pip --default-timeout=1000 install -U 模块
3、问题解决-ERROR: Could not install packages due to an OSError: [WinError 2] 系统找不到指定的文件。
cmd中输入:
python -m pip install --upgrade pip
4、ERROR: Could not find a version that satisfies the requirement pymysql (from versions: none) ERROR
原因:网络不稳定,换成国内镜像装一下就ok
具体报错:
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/pymysql/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/pymysql/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/pymysql/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/pymysql/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/pymysql/
ERROR: Could not find a version that satisfies the requirement pymysql (from versions: none)
ERROR: No matching distribution found for pymysql
WARNING: You are using pip version 21.3.1; however, version 23.0.1 is available.
You should consider upgrading via the 'D:\workplace\API_autoTest\api_lemon48_demo\venv\Scripts\python.exe -m pip install --upgrade pip' command.
解决:
pip install pymysql -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com```