安装uwsgi
python安装uwsgi的时候如果出现报错,红色的错误,大概是:Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file=’/tmp/
可能是缺少所依赖的包,按照网上的文章安装了许多的包,发现还是不行,最后才知道针对python2或者python3,不同操作系统的安装的包名也不一样。
下面是针对3.6.8来说
先执行:yum search python36 | grep devel
得到:
python36-qt5-devel.x86_64 : Development files for python3-qt5
boost-python36-devel.x86_64 : Shared object symbolic links for Boost.Python 3
boost169-mpich-python3-devel.x86_64 : Shared library symbolic links for
boost169-openmpi-python3-devel.x86_64 : Shared library symbolic links for
boost169-python3-devel.x86_64 : Shared object symbolic links for Boost.Python 3
python3-devel.i686 : Libraries and header files needed for Python development
python3-devel.x86_64 : Libraries and header files needed for Python development
python3-idle.i686 : A basic graphical development environment for Python
python3-idle.x86_64 : A basic graphical development environment for Python
然后依次执行:
yum install -y python36-cairo-devel.x86_64
yum install -y python36-greenlet-devel.x86_64
yum install -y python36-gobject-devel.x86_64
yum install -y shiboken-python36-devel.x86_64
yum install -y python34-devel.x86_64
最后选择在虚拟环境中安装uwsgi或者直接pip install uwsgi
直接用pip安装uwsgi建议建立软链接:
ln -s /usr/local/python3/bin/uwsgi /usr/bin/uwsgi
转载自SharpCJ的《填坑!!!virtualenv 中 nginx + uwsgi 部署 django》:
https://www.cnblogs.com/joy99/p/9034253.html