msys2 / mingw64:pip:此模块不支持VC 6.0

问题描述 投票:1回答:1

我尝试在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://[email protected]: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 for Windows。现在一切都变得容易了。

python pip mingw msys2
1个回答
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
© www.soinside.com 2019 - 2024. All rights reserved.