此错误消息未知,我已经重新安装了许多软件包,但到目前为止尚未找到解决方案。
我从命令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/cryptography
Storing debug log for failure in /root/.pip/pip.log
python-dev,python2.7-dev和python3-dev存在。
答案 0 :(得分:1)
确保为python安装了正确的位。 在我的情况下,我在我的64位centOs上安装了32位的anaconda python导致了这个问题。为Python安装正确的位版本修复了它。