我尝试在Windows 10(mingw64)中安装软件包并收到此错误:
IEUser@MSEDGEWIN10 MINGW64 /c/Users/IEUser/PycharmProjects/myapp_msi-msys/myapp_msi
$ pip install -e git+https://source.example.lan:40443/repos/myapp_common#egg=myapp_common
Obtaining myapp_common from git+https://source.example.lan:40443/repos/myapp_common#egg=myapp_common
Cloning https://source.example.lan:40443/repos/myapp_common to c:/users/ieuser/pycharmprojects/myapp_msi-msys/myapp_msi/src/myapp-common
Username for 'https://source.example.lan:40443':
Password for 'https://tguettler@source.example.lan:40443':
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:/msys64/mingw64/lib/python2.7/site-packages/setuptools/__init__.py", line 191, in <module>
monkey.patch_all()
File "C:/msys64/mingw64/lib/python2.7/site-packages/setuptools/monkey.py", line 101, in patch_all
patch_for_msvc_specialized_compiler()
File "C:/msys64/mingw64/lib/python2.7/site-packages/setuptools/monkey.py", line 164, in patch_for_msvc_specialized_compiler
patch_func(*msvc9('find_vcvarsall'))
File "C:/msys64/mingw64/lib/python2.7/site-packages/setuptools/monkey.py", line 151, in patch_params
mod = import_module(mod_name)
File "C:/msys64/mingw64/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "C:/msys64/mingw64/lib/python2.7/distutils/msvc9compiler.py", line 306, in <module>
raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION)
distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module
该如何解决?
我正在按照以下说明设置开发环境:https://www.gtk.org/download/windows.php
更新
仅作记录用途,我从gtk切换到qt(PySide2),现在可以将默认Python用于Windows。现在一切都变得简单了。
答案 0 :(得分:4)
在MSYS2中,许多问题是通过pacman系统信息库中的MINGW软件包向下游修补的。在这种情况下,出现此错误的原因是您安装了setuptools pip,而不是使用pacman系统信息库进行安装。要解决此问题:
pip uninstall setuptools
pacman -S mingw-w64-x86_64-python-setuptools
或者如果您使用的是现代Python:
pip3 uninstall setuptools
pacman -S mingw-w64-x86_x64-python3-setuptools