ImportError:没有名为_winreg的模块,在MacOS X上安装pypiwin32 == 219

时间:2018-07-20 08:42:06

标签: python

我正在尝试从Requirements.txt文件在虚拟环境中安装pypiwin32==219

requirements.txt

pypiwin32==219

我已经设置了我在其中工作的virtualenv denv

(denv) Nehas-MacBook-Pro:dash_pdf neha$ pip install -r requirements.txt

我收到此追溯错误:

Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/_y/g09fpxn13xq7z6ptmq3095dm0000gn/T/pip-install-7zp59n5n/pypiwin32/setup.py", line 121
    print "Building pywin32", pywin32_version
                           ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Building pywin32", pywin32_version)?

这确实是python版本的问题,所以我切换到命令:

(denv) Nehas-MacBook-Pro:dash_pdf neha$ pip2 install -r requirements.txt

出现此回溯错误时:

Using cached https://files.pythonhosted.org/packages/2b/ca/5c086c18de8f70222787b3e824e755b68d99272531522e77bb381d4f60c8/pypiwin32-219.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/_y/g09fpxn13xq7z6ptmq3095dm0000gn/T/pip-install-KEpN56/pypiwin32/setup.py", line 83, in <module>
    import _winreg
ImportError: No module named _winreg

我用Google搜索了一些内容,发现_winreg需要Windows。我无法让pypiwin32==219在MacOS上工作吗?还是我可以使用具有相同功能的任何其他模块?

0 个答案:

没有答案