简体   繁体   English

Python 3.6安装win32api?

[英]Python 3.6 install win32api?

Is there a way to install the win32api module for python 3.6 or do I have to change my version of python? 有没有办法为python 3.6安装win32api模块或者我是否必须更改我的python版本? Everytime I try to install it using pip I get the following error: 每次我尝试使用pip安装它时都会出现以下错误:

 Could not find a version that satisfies the requirement win32api (from versions: )
No matching distribution found for win32api 

Information provided by @Gord 信息由@Gord提供

As of September 2019 pywin32 is now available from PyPI and installs the latest version (currently version 224). 截至2019年9月, pywin32现在可从PyPI获得并安装最新版本(目前版本为224)。 This is done via the pip command 这是通过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, eg 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 of win32api . 没有win32api特定版本的版本。 You have to get the pywin32 module which currently cannot be installed via pip . 你必须得到目前无法通过pip安装的pywin32模块。 It is only available from this link at the moment. 目前只能通过此链接获取。

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 repository as provided in comments by @Heath 它也可以从@Heath的评论中提供的这个GitHub存储库安装

Take a look at this answer: ImportError: no module named win32api 看看这个答案: ImportError:没有名为win32api的模块

You can use 您可以使用

pip install pypiwin32

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM