cmd安装pip install pyinstaller,提示需要升级Could not find a version that satisfies the requirement pefil

1 篇文章 0 订阅
1 篇文章 0 订阅

cmd安装命令:

pip install pyinstaller 

报错如下,根据提示执行
Using cached https://files.pythonhosted.org/packages/dc/d9/6d76544c4d554cdabc58e11a28b88a9767b1a57399c460342eff2ad0aeab/pyinstaller-5.8.0-py3-none-win_amd64.whl Collecting pefile>=2022.5.30; sys_platform == “win32” (from pyinstaller) Could not find a version that satisfies the requirement pefile>=2022.5.30; sys_platform == “win32” (from pyinstaller) (from versions: ) No matching distribution found for pefile>=2022.5.30; sys_platform == “win32” (from pyinstaller) You are using pip version 19.0.3, however version 23.0.1 is available. You should consider upgrading via the ‘python -m pip install --upgrade pip’ command.

python -m pip install --upgrade pip

仍然报错
Downloading https://files.pythonhosted.org/packages/07/51/2c0959c5adf988c44d9e1e0d940f5b074516ecc87e96b1af25f59de9ba38/pip-23.0.1-py3-none-any.whl (2.1MB) 14% |████▌ | 296kB 18kB/s eta 0:01:38Exception: Traceback (most recent call last): File “C:\Users\87974\AppData\Local\Programs\Python\Python37\lib\site-packages\pip_vendor\urllib3\response.py”, line 360, in _error_catcher yield File “C:\Users\87974\AppData\Local\Programs\Python\Python37\lib\site-packages\pip_vendor\urllib3\response.py”, line 442, in read data = self._fp.read(amt) File “C:\Users\87974\AppData\Local\Programs\Python\Python37\lib\site-packages\pip_vendor\cachecontrol\filewrapper.py”, line 62, in read data = self.__fp.read(amt) File “C:\Users\87974\AppData\Local\Programs\Python\Python37\lib\http\client.py”, line 457, in read n = self.readinto(b)

在这里插入图片描述
解决方法:
更新pip版本
方案一:执行命令

easy_install -U pip

方案二:若方案一失败,则可采用国内源下载更新。执行命令:

python -m pip install --upgrade pip -i https://pypi.douban.com/simple

在这里插入图片描述

再次执行

pip install pyinstaller 

还是一直报错
在这里插入图片描述
然后更换安装方法:

#  --执行还是慢,报错(建议不用这个)
pip install https://github.com/pyinstaller/pyinstaller/tarball/develop 
#  --指定国内镜像---很快成功(建议使用这个方法)
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pyinstaller  

在这里插入图片描述

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值