python安装问题

问题1:

安装python3.7时,执行命令 sudo make install 时,报以下告警:

 

The directory '/home/libing/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

 

解决:使用命令   sudo -H make install

问题2:

subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
 

解决:删除lsb_release文件可解决此问题

rm -rf /usr/bin/lsb_release

 

问题3:

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

解决: 在./configure过程中,如果没有加上–with-ssl参数时,默认安装的软件涉及到ssl的功能不可用,
刚好pip3过程需要ssl模块,而由于没有指定,所以该功能不可用。
重新在安装配置文件中配置安装ssl   ./configure --prefix=/usr/local/python3 --with-ssl

之后重新编译安装。

问题4:

You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

解决:pip版本过低

问题5:

ModuleNotFoundError: No module named 'gi'
由于python版本非系统自带的2.7导致该文件执行有误

 

你可能感兴趣的:(python学习)