标签:http type init error not wget ref ini __init__
安装编译所需库yum install -y libffi-devel
cd /usr/local/src
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
tar zxf Python-3.7.0.tgz
cd Python-3.7.0
./configure --prefix=/usr/local/python370
make && make install
若修改默认python,yum会出问题,故添加环境变量PATH
不能修改默认
unlink /usr/bin/python
ln -s /usr/local/python370/bin/python3 /usr/bin/python
/etc/profile添加PATH
PATH=$PATH:/usr/local/python370/bin
报错
File "/usr/local/src/Python-3.7.0/Lib/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named ‘_ctypes‘
make: *** [install] Error 1
安装libffi-devel即可
标签:http type init error not wget ref ini __init__
原文地址:http://blog.51cto.com/chaoyuezhangsan/2136544