ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-download-0pn6ms8s/wrapt/setup.py'"'"'; __file__='"'"'/tmp/pip-download-0pn6ms8s/wrapt/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-tjjzc3dy
cwd: /tmp/pip-download-0pn6ms8s/wrapt/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 19, in <module>
from setuptools.dist import Distribution
File "/usr/local/lib/python3.7/site-packages/setuptools/dist.py", line 34, in <module>
from setuptools import windows_support
File "/usr/local/lib/python3.7/site-packages/setuptools/windows_support.py", line 2, in <module>
import ctypes
File "/usr/local/lib/python3.7/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
总结报错解决
问题一:安装时报错ModuleNotFoundError: No module named '_ctypes'的解决办法
1、执行如下命令:
yum install libffi-devel -y
2、从"./configure ..."重新安装Python3.7
问题二:pip3 install时报错“pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.”
先安装openssl-dev,然后重新编译安装,只是在编译的过程中加入 --enable-optimizations
ubuntu:
sudo apt-get install libffi-dev
或者
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install build-essential python-dev python-setuptools python-pip python-smbus
sudo apt-get install build-essential libncursesw5-dev libgdbm-dev libc6-dev
sudo apt-get install zlib1g-dev libsqlite3-dev tk-dev
sudo apt-get install libssl-dev openssl
sudo apt-get install libffi-dev