Python编译错误:“LONG_BIT定义对于平台来说是错误的”

Python编译错误:“LONG_BIT定义对于平台来说是错误的”,第1张

概述这个错误信息不是未知,我已经重新安装了很多软件包,但到目前为止还没有找到解决方案. 我从命令pip install cryptography中收到以下错误 /usr/include/python2.7/pyport.h:849:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config 这个错误信息不是未知,我已经重新安装了很多软件包,但到目前为止还没有找到解决方案.

我从命令pip install cryptography中收到以下错误

/usr/include/python2.7/pyport.h:849:2: error: #error "LONG_BIT deFinition appears wrong for platform (bad gcc/glibc config?)."#error "LONG_BIT deFinition appears wrong for platform (bad gcc/glibc config?)."^

在漫长的追溯结束时,它说:

distutils.errors.distutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' Failed with exit status 1----------------------------------------Cleaning up...Command /usr/bin/python -c "import setuptools,tokenize;__file__='/tmp/pip_build_root/cryptography/setup.py';exec(compile(getattr(tokenize,'open',open)(__file__).read().replace('\r\n','\n'),__file__,'exec'))" install --record /tmp/pip-xXOpFq-record/install-record.txt --single-version-externally-managed --compile Failed with error code 1 in /tmp/pip_build_root/cryptographyStoring deBUG log for failure in /root/.pip/pip.log

python-dev,python2.7-dev和python3-dev存在.

解决方法 确保为python安装了正确的位. 在我的情况下,我在我的64位centOs上安装了32位的anaconda python导致了这个问题.为Python安装正确的位版本修复了它. 总结

以上是内存溢出为你收集整理的Python编译错误:“LONG_BIT定义对于平台来说是错误的”全部内容,希望文章能够帮你解决Python编译错误:“LONG_BIT定义对于平台来说是错误的”所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1197449.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-03
下一篇 2022-06-03

发表评论

登录后才能评论

评论列表(0条)

保存