Hun*_*han 5 python cygwin statsmodels
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\distutils\mingw
dry_run, force)
File "C:\ProgramData\Anaconda3\lib\distutils\cygwinccompiler.py", line
if self.ld_version >= "2.10.90":
TypeError: '>=' not supported between instances of 'NoneType' and 'str'
Run Code Online (Sandbox Code Playgroud)
长期以来在我的 python 环境中面临这个错误,我不知道是否由于 cygwinenter code here
您需要将下面的 2 行添加到名为 distutils.cfg 的新文件到 python/Lib/distils python 安装。这将防止在原始问题中看到的“vcvarsall.bat”错误或“Visual C++ 要求”错误或 NoneType 错误。(假设“distutils.cfg”文件不存在)
[build]
compiler=mingw32.exe
(Note: The ".exe" portion is very important here, and many other guidelines tend to leave this out!)
Run Code Online (Sandbox Code Playgroud)将补丁添加到 Python/Lib/disutils/cygwinccompiler.py。将 get_msvcr() 方法更改为我自己组织的此文件中看到的方法,以确保python 选项卡安全,或者以其他方式应用来自特定错误修复 python 页面的更改。(请注意,如果将官方页面的代码复制到 cygwinccompiler.py get_msvcr 方法中,即使删除了不相关的加号,并确保所有内容对齐,也会产生错误。您需要删除选项卡,并替换它们与相应数量的空格。)
小智 3
这可能是因为您尚未将 mingw 目录添加到 Windows PATH 中。正在cygwinccompiler.py尝试将您的版本ld与特定版本进行比较,但已收到None该ld版本。查看此问题的答案AfterInstalling minGW, gcc command is not recognize
两个如何将 mingw 添加到您的 Windows PATH。将其添加到路径后,打开一个新的cmd并尝试:
gcc -dumpversion
ld -v
dllwrap -version
Run Code Online (Sandbox Code Playgroud)
如果命令被识别,您应该能够cygwinccompiler.py正常运行。
| 归档时间: |
|
| 查看次数: |
9775 次 |
| 最近记录: |