无法使用 pip 下载适用于 python 3.4、3.6 的 pyinstaller
Unble to download pyinstaller with pip for python 3.4, 3.6
我以前从未用 pip 下载过,所以我可能会做一些愚蠢的事情,但我看过教程。
我在 cmd 中使用 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)
Could not find a version that satisfies the requirement pywin32>=223
这是因为 python 3.4 不受支持吗?我会尝试下载 3.6
我尝试下载 3.6,但由于某种原因最终下载到了 C:\Users\user\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.6
我在附近的任何地方都找不到 pip。我可以将点从 3.4 拖到 3.6 吗?
尝试将其拖过来,然后从目录 C:\Users\user\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.6
中 运行 pip3 install pyinstaller
。在 3.4 目录中得到与 pip3 相同的错误。
此时我不知所措。我确定我做错了什么,但我不知道是什么。任何帮助将不胜感激!
我建议直接从该站点安装 wheel,该站点托管 windows 的预编译 wheel,包括 pyinstaller:
当你有多个 Python 安装(一个 2.7 和一个 3.x 的简单情况除外),并且你不想使用虚拟环境时,最简单的解决方案是不尝试直接 运行 像 pip
和 2to3
这样的脚本,而是通过 -m
运行 它们。这样,您只需要知道如何为每个安装 运行 Python 本身,并且您会自动知道如何 运行 其他所有内容。例如,如果你 运行 Python 3.6 这样:
python36
… 然后你 运行 像这样 Python 3.6 附带的 pip
副本:
python36 -m pip
这样你就可以保证它是 运行你想要的 pip
的副本,使用你想要的 Python 版本,所以所有东西都会安装到该版本 Python.
的站点包
在 Windows 上,处理多个 Python 安装的推荐方法是 py
启动器。当您安装 3.6 时,如果不存在,它应该已经安装了启动器,并将其配置为默认为 3.6。所以,你可以 运行 Python 3.6 像这样:
py
您应该验证这实际上是 运行s 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
等都来自该环境。
我以前从未用 pip 下载过,所以我可能会做一些愚蠢的事情,但我看过教程。 我在 cmd 中使用 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)
Could not find a version that satisfies the requirement pywin32>=223
这是因为 python 3.4 不受支持吗?我会尝试下载 3.6
我尝试下载 3.6,但由于某种原因最终下载到了 C:\Users\user\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.6
我在附近的任何地方都找不到 pip。我可以将点从 3.4 拖到 3.6 吗?
尝试将其拖过来,然后从目录 C:\Users\user\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.6
中 运行 pip3 install pyinstaller
。在 3.4 目录中得到与 pip3 相同的错误。
此时我不知所措。我确定我做错了什么,但我不知道是什么。任何帮助将不胜感激!
我建议直接从该站点安装 wheel,该站点托管 windows 的预编译 wheel,包括 pyinstaller:
当你有多个 Python 安装(一个 2.7 和一个 3.x 的简单情况除外),并且你不想使用虚拟环境时,最简单的解决方案是不尝试直接 运行 像 pip
和 2to3
这样的脚本,而是通过 -m
运行 它们。这样,您只需要知道如何为每个安装 运行 Python 本身,并且您会自动知道如何 运行 其他所有内容。例如,如果你 运行 Python 3.6 这样:
python36
… 然后你 运行 像这样 Python 3.6 附带的 pip
副本:
python36 -m pip
这样你就可以保证它是 运行你想要的 pip
的副本,使用你想要的 Python 版本,所以所有东西都会安装到该版本 Python.
在 Windows 上,处理多个 Python 安装的推荐方法是 py
启动器。当您安装 3.6 时,如果不存在,它应该已经安装了启动器,并将其配置为默认为 3.6。所以,你可以 运行 Python 3.6 像这样:
py
您应该验证这实际上是 运行s 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
等都来自该环境。