uwsgi 安装报错 plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory
1. Python3 安装 uwsgi 报错
直接使用命令 sudo pip3 install uwsgi
安装如下错误:
ubuntu@ubuntu:~/Downloads$ sudo pip3 install uwsgi
Collecting uwsgiDownloading uwsgi-2.0.18.tar.gz (801 kB)|████████████████████████████████| 801 kB 28 kB/s
Building wheels for collected packages: uwsgiBuilding wheel for uwsgi (setup.py) ... errorERROR: Command errored out with exit status 1:command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xe2_vojh/uwsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xe2_vojh/uwsgi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d In file included from plugins/python/pyloader.c:1:0:plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directorycompilation terminated.
2. 解决方法
2.1 安装 aptitude
sudo apt-get install aptitude
2.2 使用 aptitude 安装依赖 python3-dev
sudo aptitude install python3-dev
注意:依次输入 n、y、y,详细内容见下:
ubuntu@ubuntu:~/Downloads$ sudo aptitude install python3-dev
The following NEW packages will be installed:libpython3-dev{a} libpython3.5-dev{ab} python3-dev python3.5-dev{ab}
0 packages upgraded, 4 newly installed, 0 to remove and 38 not upgraded.
Need to get 37.7 MB of archives. After unpacking 53.9 MB will be used.
The following packages have unmet dependencies:python3.5-dev : Depends: python3.5 (= 3.5.1-10) but 3.5.2-2ubuntu0~16.04.5 is installed.Depends: libpython3.5 (= 3.5.1-10) but 3.5.2-2ubuntu0~16.04.5 is installed.libpython3.5-dev : Depends: libpython3.5-stdlib (= 3.5.1-10) but 3.5.2-2ubuntu0~16.04.5 is installed.Depends: libpython3.5 (= 3.5.1-10) but 3.5.2-2ubuntu0~16.04.5 is installed.
The following actions will resolve these dependencies:Keep the following packages at their current version:
1) libpython3-dev [Not Installed]
2) libpython3.5-dev [Not Installed]
3) python3-dev [Not Installed]
4) python3.5-dev [Not Installed] Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:Downgrade the following packages:
1) libpython3.5 [3.5.2-2ubuntu0~16.04.5 (now) -> 3.5.1-10 (xenial)]
2) libpython3.5-minimal [3.5.2-2ubuntu0~16.04.5 (now) -> 3.5.1-10 (xenial)]
3) libpython3.5-stdlib [3.5.2-2ubuntu0~16.04.5 (now) -> 3.5.1-10 (xenial)]
4) python3.5 [3.5.2-2ubuntu0~16.04.5 (now) -> 3.5.1-10 (xenial)]
5) python3.5-minimal [3.5.2-2ubuntu0~16.04.5 (now) -> 3.5.1-10 (xenial)] Accept this solution? [Y/n/q/?] y
The following packages will be DOWNGRADED:libpython3.5 libpython3.5-minimal libpython3.5-stdlib python3.5 python3.5-minimal
The following NEW packages will be installed:libpython3-dev{a} libpython3.5-dev{a} python3-dev python3.5-dev{a}
0 packages upgraded, 4 newly installed, 5 downgraded, 0 to remove and 38 not upgraded.
Need to get 43.4 MB of archives. After unpacking 53.7 MB will be used.
Do you want to continue? [Y/n/?] y
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:47ubuntu@ubuntu:~/Downloads$
2.3 再执行 sudo pip3 install uwsgi
sudo pip3 install uwsgi
验证是否安装成功
ubuntu@ubuntu:~/Downloads$ uwsgi --version
2.0.18
ubuntu@ubuntu:~/Downloads$
uwsgi 安装报错 plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory相关推荐
- CentOS7安装twisted报错: src/twisted/test/raiser.c:4:20: fatal error: Python.h : No such file or direc
问题: CentOS7安装twisted报错: src/twisted/test/raiser.c:4:20: fatal error: Python.h : No such file or dire ...
- ubuntu 安装scrapy error :wisted/test/raiser.c:4:20: fatal error: Python.h: No such file or directory
wisted/test/raiser.c:4:20: fatal error: Python.h: No such file or directocompilation terminated.erro ...
- python mysql python.h_MySQLdb/_mysql.c:38:20: fatal error: Python.h: No such file or directory
一.描述 在centos7.5中执行pip3 install mysqlclient,报如下错误 [root@VM_0_10_centos data]# pip3 install mysqlclien ...
- vcftools报错:Writing PLINK PED and MAP files ... Error: Could not open temporary file.解决方案
vcftools报错:Writing PLINK PED and MAP files ... Error: Could not open temporary file.解决方案 参考文章: (1)vc ...
- Install matplotlib Error: src/ft2font.h:16:22: fatal error: ft2build.h: No such file or directory
在ubuntu下从源码安装matplotlib的时候出现这样的错误: src/ft2font.h:16:22: fatal error: ft2build.h: No such file or dir ...
- ubuntu + eigen3 安装(解决 fatal error: Eigen/Core: No such file or directory)
ubuntu + eigen3 安装(解决 fatal error: Eigen/Core: No such file or directory) 转载链接:https://www.cnblogs.c ...
- 成功解决Ubuntu下的include/darknet.h:14:14: fatal error: cuda_runtime.h: No such file or directory
成功解决Ubuntu下的include/darknet.h:14:14: fatal error: cuda_runtime.h: No such file or directory 目录 解决问题 ...
- caffe安装:./include/caffe/util/device_alternate.hpp:34:23: fatal error: cublas_v2.h: 没有那个文件或目录
出现问题: dorothy@dorothy-MS-7A94:~/enviroment/caffe-master$ make all -j8 PROTOC src/caffe/proto/caffe.p ...
- shell脚本报错问题: -bash: ./test.sh: /bin/sh^M: bad interpreter: No such file or directory
今天写了一个shell脚本,然后在执行的时候报错,脚本内容很简单,仅供测试: Shell代码: #!/bin/sh echo "test shell " 具体报错信息如 ...
最新文章
- Forbid consumer 192.168.85.1 access service com.sharearn.dubbo.romote.TestService from registry
- 004_Bean标签
- 动态规划训练25 [Food Delivery ZOJ - 3469 ]好题
- 共享内存:mmap函数实现
- 基于CloudStack+KVM的企业私有云的实现
- getdistance mysql_mysql 自定义函数获取两点间距离
- mysql+int+类型如何模糊搜索_mysql全文模糊搜索MATCH AGAINST方法示例
- html 实现复制功能
- 电子计算机的字母是什么意思,计算器上的英文字母
- 生理卫生课的经典对白
- Linux(Centos6.5)下安装Vertica9.2.1数据库教程
- 字体图标的下载与使用
- 【开源“青女四轴”,DIY小四轴】
- Pytorch错误集锦
- 蚌埠2021高考成绩查询,蚌埠2021高考成绩查询系统入口
- 关于IOS的Autolayout特性的理解以及使用
- python买苹果增强版
- “提升业务决策效率:探索FICO Blaze决策引擎的应用“
- Android逆向工程--将Apk转成Java文件
- ASA 5545防火墙及思科3750交换机配置办公网络