为了账号安全,请及时绑定邮箱和手机立即绑定

无法为python 3.4、3.6下载带有pip的pyinstaller

无法为python 3.4、3.6下载带有pip的pyinstaller

拉丁的传说 2021-05-14 15:15:48
我以前从未下载过pip,所以我可能做的有些愚蠢,但是我看过教程。我正在使用cmp中的pip安装,使用的是python34 / Scripts的路径(pip所在的位置)。我正在获取控制台输出:C:/Python34/Scripts>pip install pyinstallerDownloading/unpacking pyinstallerCannot fetch index base URL https://pypi.python.org/simple/Could not find any downloads that satisfy the requirement pyinstallerCleaning up...No distributions at all found for pyinstallerStoring debug log for failure [...]我尝试使用pip3:C:\Python34\Scripts>pip3 install pyinstallerCollecting pyinstaller  Using cached PyInstaller-3.3.1.tar.gzRequirement already satisfied: setuptools in c:\python34\lib\site-packages (from pyinstaller)Collecting pefile>=2017.8.1 (from pyinstaller)Using cached pefile-2017.11.5.tar.gzCollecting macholib>=1.8 (from pyinstaller)Using cached macholib-1.9-py2.py3-none-any.whlCollecting future (from pyinstaller)Using cached future-0.16.0.tar.gzCollecting pypiwin32 (from pyinstaller)Using cached pypiwin32-223-py3-none-any.whlCollecting altgraph>=0.15 (from macholib>=1.8->pyinstaller)Using cached altgraph-0.15-py2.py3-none-any.whlCollecting pywin32>=223 (from pypiwin32->pyinstaller)Could not find a version that satisfies the requirement pywin32>=223 (from pypiwin32->pyinstaller) (from versions: )No matching distribution found for pywin32>=223 (from pypiwin32->pyinstaller)找不到满足要求pywin32> = 223的版本这是因为可能不支持python 3.4吗?我将尝试下载3.6我尝试下载3.6,由于某种原因,它最终下载到了C:\Users\user\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.6 我附近无法找到的点。我可以将点数从3.4拖动到3.6吗?尝试将其拖动到,然后pip3 install pyinstaller从目录运行C:\Users\user\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.6。与3.4目录中的pip3出现相同的错误。在这一点上我很茫然。我确定我做错了什么,但我不知道该怎么办。任何帮助将不胜感激!
查看完整描述

2 回答

?
阿波罗的战车

TA贡献1862条经验 获得超6个赞

当你有多个Python的安装(除了一个2.7和一个3.X的简单情况),你不希望使用的虚拟环境中,最简单的办法就是不要尝试运行像脚本pip和2to3直接,而是运行他们通过-m。这样,您只需要知道如何在每个安装中运行Python本身,就可以自动知道如何运行其他所有内容。例如,如果您像这样运行Python 3.6:


 python36

…然后您运行pipPython 3.6附带的副本,如下所示:


python36 -m pip

这样,您可以确保它正在运行所需的副本pip,并使用所需的Python版本,因此所有内容都将安装到该版本的Python的站点包中。


在Windows上,处理多个Python安装的推荐方法是py启动器。当您安装3.6时,它应该已经安装了启动器(如果不存在),并将其配置为默认为3.6。因此,您可以像这样运行Python 3.6:


py

您应该验证它是否实际运行Python 3.6。但是,假设确实如此,则可以这样运行pip:


py -m pip

但是,您确定要管理多个Python安装吗?您的代码不太可能在3.4中工作,但在3.6中工作。(如果您为3.4安装了一堆软件包,则需要冻结需求文件并以3.6安装它,但是由于您以前从未使用pip过,所以这不是问题。)因此,如果您只是卸载3.4,则全部这种混乱甚至不会出现。


虽然您仍然可能想要py -m pip。这样,您不必在PATH或cd特定目录中添加内容。py应该总是可用的。


另外,如果您确实希望安装多个Python,是否确定不想使用虚拟环境?这样一来,无论环境中,您目前已经激活,python,pip,等全部来自该环境。


查看完整回答
反对 回复 2021-05-25
?
慕后森

TA贡献1802条经验 获得超5个赞

我建议直接从此站点安装轮子,该站点托管用于Windows的预编译轮子,包括pyinstaller:

https://www.lfd.uci.edu/~gohlke/pythonlibs/


查看完整回答
反对 回复 2021-05-25
  • 2 回答
  • 0 关注
  • 429 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号