python3.7.1 编译安装时报错 ModuleNotFoundError: No module named '_ctypes' make: *** [install] 错误 1

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qq_39719589/article/details/85165772

1.使用命令make install   或者  make && make install 时,报错了。

yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
mkdir -p /usr/local/python3
tar -zxvf Python-3.7.1.tgz
cd Python-3.7.1
./configure --prefix=/usr/local/python3
make install   或者  make && make install

报错截图

2.缺少安装依赖,解决方法,安装libffi-devel依赖,再重新编译安装python3.7.1即可成功 

yum -y install libffi-devel 

参考,stackoverflow,https://stackoverflow.com/questions/27022373/python3-importerror-no-module-named-ctypes-when-using-value-from-module-mul

展开阅读全文

没有更多推荐了,返回首页