pip坑合集

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```

持续踩坑,每踩必记~

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值