gpt4 book ai didi

python - 忽略 ensurepip 失败 pip 在 Ubuntu 18.04 中需要 ssl/tls 错误

转载 作者:太空狗 更新时间:2023-10-30 00:58:40 25 4
gpt4 key购买 nike

尝试在 Ubuntu 18.04 中安装 python 和 pip 时出现 ignoring ensurepip failure pip requires ssl/tls 错误

尝试运行 sudo make install 会出现上述错误。

# Download Python
curl -O https://www.python.org/ftp/python/3.4.2/Python-3.4.2.tgz
tar -xzvvf Python-3.4.2.tgz
cd Python-3.4.2
export CFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib -I/usr/local/opt/zlib/include -L/usr/local/opt/zlib/lib"

# Required Dependencies
sudo apt-get install libssl-dev openssl
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libpq-dev zlib1g-dev

# Prepare to install Python
./configure
make -j4
sudo make install

最佳答案

这是一个 python 编译问题,已经 fixed as of Python 3.4.5 .最佳做法是升级到 3.4.5 并再次执行编译步骤。

对于那些来到这里的 Python <3.5.3 有同样问题的人,这个同样的问题已经在 3.5.3 中得到修复(参见 here )。

我不确定其他 Python 版本是否受到影响,但在补丁说明中看到在更高版本中也对 Windows 和 MacOSX 进行了修复。请检查您正在使用的 Python 主要版本的更改日志,以查看哪个修复适用于您。更改日志可以在这里找到:(Python 3.4Python 3.5)

关于python - 忽略 ensurepip 失败 pip 在 Ubuntu 18.04 中需要 ssl/tls 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50126814/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com