'python setup.py bdist'在'compiler_flags'上获取错误

问题描述

Windows 2016 和以下官方文档上,我已经成功compiled source code Python-3.6.12 。尝试build distribution时,出现以下错误,抱怨 compiler_flags

还要注意,这来自于编译源代码,命令python实际上在主目录中调用python.bat

请告诉我是否需要更多详细信息,我们将不胜感激任何帮助或指点。

截屏:
(来自CMD的python版本和异常回溯)

D:\Python\Python36>python -V
Running Release|x64 interpreter...
Python 3.6.12

D:\Python\Python36>python setup.py bdist
Running Release|x64 interpreter...
Traceback (most recent call last):
File "setup.py",line 29,in <module>
set_compiler_flags('CFLAGS','PY_CFLAGS_NODIST')
File "setup.py",line 27,in set_compiler_flags
sysconfig.get_config_vars()[compiler_flags] = flags + ' ' + py_flags_nodist
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

D:\Python\Python36>

更多信息:
现在,我已经安装了pip,setuptools,wheel,并将“ D:\ Python \ Python36”和“ D:\ Python \ Python36”的目录添加到Path。但是,bdist上的错误保持不变。我是Python源代码发布的新手,所以感谢您的帮助和耐心。

屏幕截图:

D:\Python\Python36>python -m pip install --upgrade setuptools wheel
Running Release|x64 interpreter...
Requirement already up-to-date: setuptools in d:\python\python36\lib\site-packages (50.1.0)
Requirement already up-to-date: wheel in d:\python\python36\lib\site-packages (0.35.1)

...
D:\Python\Python36>python setup.py bdist
Running Release|x64 interpreter...
Traceback (most recent call last):
  ... the same error as before ...

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)