其他分享
首页 > 其他分享> > pip离线安装tar.gz文件报错ModuleNotFoundError: No module named ‘_ctypes‘

pip离线安装tar.gz文件报错ModuleNotFoundError: No module named ‘_ctypes‘

作者:互联网

报错现象

如下

File"/usr/local/python3.8/lib/python3.8/sitepackages/setuptools/windows_support.py", line 2, in
import ctypes
File "/usr/local/python3.8/lib/python3.8/ctypes/__init__.py", line 7, in
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.

解决办法:

重新安装Python3.8.6

解决方法:

需要安装 libffi-devel

yum install libffi-devel -y

重新编译安装python
cd Python-3.8.6/
make clean

make

make install

再次安装离线包

pip3 install --no-index --find-links=./ -r requirements.txt

 

参考

(39条消息) Python 库安装方法:pip安装tar.gz压缩包,pip安装whl文件_挣扎的蓝藻的博客-CSDN博客_pip安装tar.gz
https://blog.csdn.net/qq_38161040/article/details/101784059

(39条消息) python pip安装报错_CentOS7 安装 Python3.8后 pip 安装报错_weixin_39945810的博客-CSDN博客
https://blog.csdn.net/weixin_39945810/article/details/110756484

 

标签:named,python,离线,报错,pip,ctypes,安装,python3.8
来源: https://www.cnblogs.com/paul8339/p/16427582.html