正在为python 3.8.8安装win32com



我尝试过在python 3.8.8版本上安装win32com,使用了几种方法,最终解决了问题

!python -m pip install pypiwin32

然而,我得到了这个错误。

Collecting pypiwin32
Downloading pypiwin32-223-py3-none-any.whl (1.7 kB)
Downloading pypiwin32-219.zip (4.8 MB)
|████████████████████████████████| 4.8 MB 3.2 MB/s eta 0:00:01
ERROR: Command errored out with exit status 1:
command: /opt/conda/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rxlumrt5/pypiwin32_d674fe4e172b4a5ab12b6b8f2aeb2d90/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rxlumrt5/pypiwin32_d674fe4e172b4a5ab12b6b8f2aeb2d90/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-eb1keprl
cwd: /tmp/pip-install-rxlumrt5/pypiwin32_d674fe4e172b4a5ab12b6b8f2aeb2d90/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-rxlumrt5/pypiwin32_d674fe4e172b4a5ab12b6b8f2aeb2d90/setup.py", line 121
print "Building pywin32", pywin32_version
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Building pywin32", pywin32_version)?
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/2b/ca/5c086c18de8f70222787b3e824e755b68d99272531522e77bb381d4f60c8/pypiwin32-219.zip#sha256=06d478295c89dbdd4187e1ac099bb8eab93c29e298bded4e2fbc77009287fa44 (from https://pypi.org/simple/pypiwin32/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pywin32>=223 (from pypiwin32)
ERROR: No matching distribution found for pywin32>=223

请求协助。

感谢和问候,

Yadhunandan

上次使用win32com时,我安装了软件包pywin32,而不是pypiwin32。我不确定pypiwin32的维护情况,因为pypi上没有项目描述,它只有3个版本,最后一个是在2018年(https://pypi.org/project/pypiwin32/)。

所以不妨试试这个:https://pypi.org/project/pywin32/

最新更新