zoukankan      html  css  js  c++  java
  • centos7下python3.6安装uwsgi失败的解决方法

    报错信息(省略大部分):

    plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory
         #include <Python.h>

    原因:必须同时安装“编译工具”和“python-devel”,才能成功安装uwsgi

    解决方法:

    1.安装编译工具

    yum install -y gcc* pcre-devel openssl-devel

    2.安装python-devel(重要)

    这一步跟着网上很多步骤走,但是都出错了。可能是版本不同的原因,下面是我总结的方法:

    首先yum搜索python-devel

    yum search python-devel

    搜索到了

    python-devel.x86_64 : The libraries and header files needed for Python development

    安装下来后发现是python2.7版本的。然而需要安装的是3.6版本的。

    用如下命令搜索3.6版本:

    yum search python36-devel

    搜索到了:

    python36-devel.x86_64 : Libraries and header files needed for Python development

    是需要的版本,然后安装:

    yum install python36-devel.x86_64

    3.最后安装uwsgi:

    pip install uwsgi

    成功!

  • 相关阅读:
    Stream中的map
    项目中的process.bpmn的读-过程
    windows10打开switchHost,提示无修改权限
    Windows10安装node.js
    工作中的小发现
    启动redis
    call apply bin 的区别
    利用promise 让 函数按序执行
    uni-app 小程序
    插件 Generate css tree
  • 原文地址:https://www.cnblogs.com/ingen42/p/10791957.html
Copyright © 2011-2022 走看看