安装pypiwin32后未满足pywin32要求

2024-06-18 17:15:34 发布

您现在位置:Python中文网/ 问答频道 /正文

尝试使用pip安装Python 2.7.13(windows x64)的pyad包。 需求中存在pywin32包,因此我们得到一个错误:

C:\Windows\system32>pip install pyad
Collecting pyad
Using cached pyad-0.5.16.tar.gz
Requirement already satisfied: setuptools in c:\python27\lib\site-packages (from pyad)
Collecting pywin32 (from pyad)
    Could not find a version that satisfies the requirement pywin32 (from pyad) (from versions: )
    No matching distribution found for pywin32 (from pyad)

然后我安装pypiwin32,它以前在这种情况下工作:

C:\Windows\system32>pip install pypiwin32
Collecting pypiwin32
  Using cached pypiwin32-219-cp27-none-win32.whl
Installing collected packages: pypiwin32
Successfully installed pypiwin32-219

但在此之后,我仍然无法安装pyad,错误与上述相同,例如pypiwin32从未安装:

C:\Windows\system32>pip install pyad
Collecting pyad
Using cached pyad-0.5.16.tar.gz
Requirement already satisfied: setuptools in c:\python27\lib\site-packages (from pyad)
Collecting pywin32 (from pyad)
    Could not find a version that satisfies the requirement pywin32 (from pyad) (from versions: )
    No matching distribution found for pywin32 (from pyad)

文件夹C:\Python27\Lib\site-packages\pywin32_system32存在,似乎已安装pypiwin32包。

有什么解决办法吗?


Tags: installpipfromwindowspackages错误sitetar
2条回答

您正面临pywin32安装问题,这是一个二进制轮。

您可以下载pywin32here的二进制控制盘。安装时使用

pip install pywin32-221-cp27-cp27m-win32.whl

如果是你下载的文件

根据您的安装选择正确的版本(Python版本和32/64位Python版本)

你可以有详细的说明here

pyad声明它需要“分发包”才能安装。分发包,即来自PyPI的可以pip install的内容,与Python包不同,Python包是具有可以导入的__init__.py的文件夹。命名很混乱。

因此,因为它没有安装,所以它试图安装pywin32,但找不到与您的Python环境匹配的发行版:Windows x64上的Python 2.7。在PyPI上,似乎只有Python 3.6的发行版:https://pypi.python.org/pypi/pypiwin32/220

相关问题 更多 >