centos 安装uwsgi报错:pip3 install uwsgi(centos7)

网友投稿 768 2022-09-04


centos 安装uwsgi报错:pip3 install uwsgi(centos7)

报错1:

WARNING: Discarding (from Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. Downloading (590 kB) |████████████████████████████████| 590 kB 155 kB/s ERROR: Command errored out with exit status 1: command: /usr/local/python3/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-oyzteori/uwsgi_6dbf2cdc9a9546f4b5008f8867f6294e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-oyzteori/uwsgi_6dbf2cdc9a9546f4b5008f8867f6294e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-_xm07qeo cwd: /tmp/pip-install-oyzteori/uwsgi_6dbf2cdc9a9546f4b5008f8867f6294e/ Complete output (11 lines): Traceback (most recent call last): File "", line 1, in File "/usr/local/python3/lib/python3.9/site-packages/setuptools/__init__.py", line 18, in from setuptools.dist import Distribution File "/usr/local/python3/lib/python3.9/site-packages/setuptools/dist.py", line 34, in from setuptools import windows_support File "/usr/local/python3/lib/python3.9/site-packages/setuptools/windows_support.py", line 2, in import ctypes File "/usr/local/python3/lib/python3.9/ctypes/__init__.py", line 8, in from _ctypes import Union, Structure, Array ModuleNotFoundError: No module named '_ctypes' ----------------------------------------WARNING: Discarding (from Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.ERROR: Could not find a version that satisfies the requirement uwsgi (from versions: 1.4.9, 1.4.10, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6, 1.9.7, 1.9.8, 1.9.9, 1.9.10, 1.9.11, 1.9.12, 1.9.13, 1.9.14, 1.9.15, 1.9.16, 1.9.17, 1.9.17.1, 1.9.18, 1.9.18.1, 1.9.18.2, 1.9.19, 1.9.20, 1.9.21, 1.9.21.1, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.5.1, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10, 2.0.11, 2.0.11.1, 2.0.11.2, 2.0.12, 2.0.13, 2.0.13.1, 2.0.14, 2.0.15, 2.0.16, 2.0.17, 2.0.17.1, 2.0.18, 2.0.19, 2.0.19.1, 2.0.20)ERROR: No matching distribution found for uwsgiWARNING: You are using pip version 21.1.1; however, version 22.0.4 is available.You should consider upgrading via the '/usr/local/python3/bin/python3.9 -m pip install --upgrade pip' command.

报错2:

[root@python01 ~]# pip3 install uwsgiLooking in indexes: uwsgi Downloading (804 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 804.9/804.9 KB 10.6 MB/s eta 0:00:00 Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [1 lines of output] ERROR: Can not execute `setup.py` since setuptools is not available in the build environment. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip.error: metadata-generation-failed× Encountered error while generating package metadata.╰─> See above for output.note: This is an issue with the package mentioned above, not pip.

解决方法:

# 安装依赖

yum -y groupinstall "Development tools"yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel psmisc libffi-devel tk-devel pcre-devel

# 升级pip和setuptools

/usr/local/python3/bin/python3.9 -m pip install --upgrade pippip3 install --upgrade setuptools

# 再安装

pip3 install uwsgi


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:5个实用的PDF自动化办公操作~1行Python代码搞定:解密、加水印、PPT/Word/TxT转PDF
下一篇:springboot注解Aspect实现方案
相关文章

 发表评论

暂时没有评论,来抢沙发吧~