![](/img/trans.png)
[英]pip install reportlab error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
[英]when I try to install Flask-bcrypt it throws me error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
当我尝试为我的应用安装flask-bcrypt库时,抛出此错误:
创建build / temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/bcrypt
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c bcrypt/bcrypt.c -o build/temp.linux-x86_64-2.7/bcrypt/bcrypt.o
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c bcrypt/bcrypt_pbkdf.c -o build/temp.linux-x86_64-2.7/bcrypt/bcrypt_pbkdf.o
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c bcrypt/bcrypt_python.c -o build/temp.linux-x86_64-2.7/bcrypt/bcrypt_python.o
bcrypt/bcrypt_python.c:18:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
如何解决呢? -提前致谢!
如果您发现在安装Python-dev后遇到麻烦,请安装外部函数接口。 多数民众赞成在我能够安装Brypt时:
须藤apt-get install libffi-dev
须藤apt-get install python-dev
根据您的配置,您可能需要安装python3-dev
软件包。
您需要安装python-dev
软件包才能构建Python扩展。
您没有提到正在使用什么操作系统,但是需要安装Python-dev。
假设Ubuntu:
sudo apt-get install python-dev
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.