1、ModuleNotFoundError: No module named '_ctypes'
yum install libffi-devel tk-devel
后重新安装python3.7
./configure 检查编译环境/相关库文件/配置参数,生成makefile
make 对源代码进行编译,生成可执行文件
make install 将生成的可执行文件安装到当前计算机中特点;
2、为python版本添加python-git
思考:对各个python版本的pip有点蒙,比如python3.7使用的时候pip到底是直接使用pip3.7还是?
https://gitpython.readthedocs.io/en/stable/intro.html#getting-started
更换完python后,python3显示指向3.7
lrwxrwxrwx 1 root root 9 Mar 25 11:14 /usr/local/bin/python3 -> python3.7
为python3.7安装Gitpython
所以用的python3 setup.py install,但是使用python的git库时,还是会出现git不存在的问题
用python3.7 setup.py install却显示python3.7不存在
后查看python3.7的库存放位置:ls /usr/local/lib/python3.7/site-packages/
发现之前用python3安装的Gitpython并不在库目录里
最后用 sudo /usr/local/bin/python3.7 setup.py install安装成功
思考:如果发现模块不存在,就去这个库里查看是否安装成功,
[***@continuity-build00 GitPython]$ ls /usr/local/lib/python3.7/site-packages/
easy-install.pth easy_install.py gitdb-4.0.2-py3.7.egg GitPython-3.1.0-py3.7.egg pip pip-19.2.3.dist-info pkg_resources __pycache__ README.txt setuptools setuptools-41.2.0.dist-info smmap-3.0.1-py3.7.egg