Python 3.6 安装 win32api?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/42370339/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Python 3.6 install win32api?
提问by kon
Is there a way to install the win32api module for python 3.6 or do I have to change my version of python? Everytime I try to install it using pip I get the following error:
有没有办法为 python 3.6 安装 win32api 模块,或者我是否必须更改我的 python 版本?每次我尝试使用 pip 安装它时,都会出现以下错误:
Could not find a version that satisfies the requirement win32api (from versions: )
No matching distribution found for win32api
回答by WhatsThePoint
Information provided by @Gord
@Gord 提供的信息
As of September 2019 pywin32
is now available from PyPI and installs the latest version (currently version 224). This is done via the pip
command
截至 2019 年 9 月pywin32
,现在可从 PyPI 获得并安装最新版本(当前版本 224)。这是通过pip
命令完成的
pip install pywin32
If you wish to get an older version the sourceforge link below would probably have the desired version, if not you can use the command, where xxx
is the version you require, e.g. 224
如果您希望获得旧版本,下面的 sourceforge 链接可能包含所需的版本,如果没有,您可以使用该命令,xxx
您需要的版本在哪里,例如 224
pip install pywin32==xxx
This differs to the pip
command below as that one uses pypiwin32
which currently installs an older (namely 223)
这与pip
下面的命令不同,因为该命令pypiwin32
当前安装了较旧的(即 223)
Browsing the docs I see no reason for these commands to work for all python3.x
versions, I am unsure on python2.7
and below so you would have to try them and if they do not work then the solutions below will work.
浏览文档我认为这些命令没有理由适用于所有python3.x
版本,我不确定是否适用于所有版本,python2.7
因此您必须尝试它们,如果它们不起作用,那么下面的解决方案将起作用。
Probably now undesirable solutions but certainly still valid as of September 2019
现在可能是不受欢迎的解决方案,但截至 2019 年 9 月肯定仍然有效
There is no version of specific version ofwin32api
. You have to get the pywin32
module which currently cannotbe installed via pip
. It is only available from this link at the moment.
没有特定版本的win32api
. 您必须获取pywin32
当前无法通过pip
. 目前仅可从此链接获得。
https://sourceforge.net/projects/pywin32/files/pywin32/Build%20220/
https://sourceforge.net/projects/pywin32/files/pywin32/Build%20220/
The install does not take long and it pretty much all done for you. Just make sure to get the right version of it depending on your python
version :)
安装不需要很长时间,几乎所有的工作都为您完成。只需确保根据您的python
版本获得正确的版本:)
EDIT
编辑
Since I posted my answer there are other alternatives to downloading the win32api
module.
由于我发布了我的答案,因此还有其他下载win32api
模块的替代方法。
It is now available to download through pip
using this command;
现在可以通过pip
这个命令下载了;
pip install pypiwin32
Also it can be installed from this GitHub repositoryas provided in comments by @Heath
也可以从@Heath 的评论中提供的这个GitHub 存储库安装它
回答by George Crowther
Take a look at this answer: ImportError: no module named win32api
看看这个答案: ImportError: no module named win32api
You can use
您可以使用
pip install pypiwin32