我从命令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定义对于平台来说是错误的”所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)