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

标签 python windows python-3.6

Windows 2016 和以下官方文档上,我已成功完成compiled source code Python-3.6.12 。尝试build distribution时,出现以下错误,提示关于editor_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 ...

最佳答案

尝试添加“NoneType”值和“str”值时,您似乎出错了。如果这些是您要连接的值,则应使用:

variable = ''.join(value 1, value 2)

关于python - 'python setup.py bdist'在 'compiler_flags'上获取错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63728136/

相关文章:

windows - 由于权限被拒绝,无法绑定(bind)到某些端口

python 从表中选择列,其中列 = self.variable

python - 安装 easy_install... 以安装 lxml

python - pymongo 可以检测集合是否被限制了吗?

windows - Windows 上 Ubuntu 上的 Bash 在 Windows 中的 Lxss 文件夹丢失

python - 比较python中的2个字典并创建一个包含字典值的列表

python - 组合来自多个不同长度列表的数据

python - 时区错误? 30分钟而不是1小时

python - 使用 numpy.vectorize() 旋转 NumPy 数组的所有元素

python - 无法在 python 上运行转义的 Windows 命令行