![](/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.