当我尝试安装Flask

当我尝试安装Flask

本文介绍了当我尝试安装Flask-bcrypt它会引发错误:命令'x86_64-linux-gnu-gcc'失败,退出状态1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试为我的应用程序安装flask-bcrypt库时,它正在抛出这个错误:

创建build / temp.linux-x86_64-2.7

 创建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:致命错误:Python.h:没有这样的文件或目录

#includePython.h
^

编译终止。

错误:命令'x86_64-linux-gnu-gcc'失败,退出状态1

如何解决?
-thanks提前!

解决方案

sudo apt-get install python-dev


When I try to install flask-bcrypt library for my app it is throwing me this error:

creating 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

how to solve it??-thanks in advance!

解决方案

sudo apt-get install python-dev

这篇关于当我尝试安装Flask-bcrypt它会引发错误:命令'x86_64-linux-gnu-gcc'失败,退出状态1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 06:04