在kali安装python3.9出现pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
时间: 2023-11-03 13:03:24 浏览: 256
解决安装python3.7.4报错Can''t connect to HTTPS URL because the SSL module is not available
在Kali Linux上安装Python 3.9时出现该错误是因为缺少必要的SSL库。您可以尝试以下方法解决此问题:
1. 首先,确保您的系统已更新到最新版本。使用以下命令进行系统更新:
```
sudo apt update
sudo apt upgrade
```
2. 安装所需的依赖库以支持SSL功能:
```
sudo apt install -y libssl-dev openssl
```
3. 使用以下命令重新安装Python 3.9:
```
sudo apt install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev \
libffi-dev liblzma-dev
wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz
tar -xf Python-3.9.0.tgz
cd Python-3.9.0
./configure --enable-optimizations
make -j$(nproc)
sudo make altinstall
```
4. 安装完成后,您应该能够使用Python 3.9,并且pip也应该正常工作。
阅读全文