在 virtualenv 中安装 uwsgi 时出错 [英] Error installing uwsgi in virtualenv

查看:79
本文介绍了在 virtualenv 中安装 uwsgi 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 linux ubuntu、python 3.5.2 上的虚拟环境中安装 uswgi我愿意

I'm trying to install uswgi in a virutal env on linux ubuntu, python 3.5.2 I do

pip install uwsgi

我遇到了这个错误

Failed building wheel for uwsgi

并在安装日志的末尾

    *** uWSGI compiling embedded plugins ***
[thread 0][x86_64-linux-gnu-gcc -pthread] plugins/python/python_plugin.o
[thread 1][x86_64-linux-gnu-gcc -pthread] plugins/python/pyutils.o
In file included from plugins/python/python_plugin.c:1:0:
plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory
compilation terminated.
In file included from plugins/python/pyutils.c:1:0:
plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory
compilation terminated.

----------------------------------------

Command "/home/ubuntu/envflask/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-wthov1ur/uwsgi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-quiupta5-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/envflask/env/include/site/python3.5/uwsgi" failed with error code 1 in /tmp/pip-build-wthov1ur/uwsgi/

  • Linux 4.4.0-66-generic x86_64
  • Python 3.5.2
  • 有什么解决办法吗?谢谢

    It is any solution for this? Thanks

    推荐答案

    需要安装Python3.5开发文件,所以运行这个命令:

    You need to install Python3.5 development files, so run this command:

    apt-get install python3.5-dev
    

    上述命令将安装 Python 3 头文件以从源代码构建 uWSGI.

    The above command will install Python 3 headers to build uWSGI from source.

    这篇关于在 virtualenv 中安装 uwsgi 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆