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相关推荐

  1. 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 ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 成功解决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 目录 解决问题 ...

  8. 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 ...

  9. shell脚本报错问题: -bash: ./test.sh: /bin/sh^M: bad interpreter: No such file or directory

    今天写了一个shell脚本,然后在执行的时候报错,脚本内容很简单,仅供测试: Shell代码:   #!/bin/sh    echo "test shell "  具体报错信息如 ...

最新文章

  1. Forbid consumer 192.168.85.1 access service com.sharearn.dubbo.romote.TestService from registry
  2. 004_Bean标签
  3. 动态规划训练25 [Food Delivery ZOJ - 3469 ]好题
  4. 共享内存:mmap函数实现
  5. 基于CloudStack+KVM的企业私有云的实现
  6. getdistance mysql_mysql 自定义函数获取两点间距离
  7. mysql+int+类型如何模糊搜索_mysql全文模糊搜索MATCH AGAINST方法示例
  8. html 实现复制功能
  9. 电子计算机的字母是什么意思,计算器上的英文字母
  10. 生理卫生课的经典对白
  11. Linux(Centos6.5)下安装Vertica9.2.1数据库教程
  12. 字体图标的下载与使用
  13. 【开源“青女四轴”,DIY小四轴】
  14. Pytorch错误集锦
  15. 蚌埠2021高考成绩查询,蚌埠2021高考成绩查询系统入口
  16. 关于IOS的Autolayout特性的理解以及使用
  17. python买苹果增强版
  18. “提升业务决策效率:探索FICO Blaze决策引擎的应用“
  19. Android逆向工程--将Apk转成Java文件
  20. ASA 5545防火墙及思科3750交换机配置办公网络

热门文章

  1. UUID的使用及其原理
  2. 【Golang源码分析】Go Web常用程序包gorilla/mux的使用与源码简析
  3. 浅显易懂 Makefile 入门 (07)— 其它函数(foreach 、if、call、origin )
  4. 深度学习学习指南-工具篇
  5. Centos7常用命令
  6. docker 常用命令集合
  7. 【Sql Server】数据库的3大服务
  8. 分类问题-样本权重(sample_weight)和类别权重(class_weight)
  9. Conv1D和Conv2D的区别
  10. 如何将算子添加到Relay