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

我以前从未下载过pip,所以我可能做的有些愚蠢,但是我看过教程。我正在使用cmp中的pip安装,使用的是python34 / Scripts的路径(pip所在的位置)。我正在获取控制台输出:


C:/Python34/Scripts>pip install pyinstaller

Downloading/unpacking pyinstaller

Cannot fetch index base URL https://pypi.python.org/simple/

Could not find any downloads that satisfy the requirement 

pyinstaller

Cleaning up...

No distributions at all found for pyinstaller

Storing debug log for failure [...]

我尝试使用pip3:


C:\Python34\Scripts>pip3 install pyinstaller

Collecting pyinstaller

  Using cached PyInstaller-3.3.1.tar.gz

Requirement 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.gz

Collecting macholib>=1.8 (from pyinstaller)

Using cached macholib-1.9-py2.py3-none-any.whl

Collecting future (from pyinstaller)

Using cached future-0.16.0.tar.gz

Collecting pypiwin32 (from pyinstaller)

Using cached pypiwin32-223-py3-none-any.whl

Collecting altgraph>=0.15 (from macholib>=1.8->pyinstaller)

Using cached altgraph-0.15-py2.py3-none-any.whl

Collecting 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出现相同的错误。


在这一点上我很茫然。我确定我做错了什么,但我不知道该怎么办。任何帮助将不胜感激!


拉丁的传说
浏览 430回答 2
2回答

阿波罗的战车

当你有多个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,等全部来自该环境。

慕后森

我建议直接从此站点安装轮子,该站点托管用于Windows的预编译轮子,包括pyinstaller:https://www.lfd.uci.edu/~gohlke/pythonlibs/
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python