Ubuntu 18
安装 Python 3.7
报错的解决方案
Ubuntu 18
Python 3.7
- Ubuntu 18 安装 Python 3.7 报错的解决方案
- 0. 环境
- 1. sudo make install 报错 ZipImportError
- 2. sudo make install 报错 ModuleNotFoundError
- 3. pip3.7 list 提示没有 ssl 模块
0. 环境
- 系统版本:
Ubuntu 18.04.1 LTS
-
版本:Python
Python 3.7.0
1. sudo make install
报错 ZipImportError
sudo make install
ZipImportError
- 错误信息如下:
- 解决方案:
sudo apt install zlib1g-dev
2. sudo make install
报错 ModuleNotFoundError
sudo make install
ModuleNotFoundError
- 错误信息如下:
- 解决方案:
sudo apt install libffi-dev
3. pip3.7 list
提示没有 ssl
模块
pip3.7 list
ssl
- 提示信息如下:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
- 解决方案:
sudo apt install libssl-dev
./configure
make
sudo make install