gpt4 book ai didi

python - 尝试安装 python 时出现错误 : Missing the OpenSSL lib?

转载 作者:太空狗 更新时间:2023-10-29 11:25:45 28 4
gpt4 key购买 nike

我尝试在 pyenv env 中安装 python,但出现以下错误。我已将 openssl 添加到路径变量中,因为 openssl 已经可用,但它仍然抛出相同的错误。

此外,现在尝试使用单独的用户(不是 root)。同样的错误!并尝试跟进 wiki 页面,但对于 OpenSUSE,我在谷歌上也找不到太多帮助。

有人可以指导我如何进一步进行吗。

 xxxxx@xxxxxxxxxxx:~/.pyenv> pyenv install 3.5.2
Downloading Python-3.5.2.tar.xz...
-> https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz
Installing Python-3.5.2...
WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

Please consult to the Wiki page to fix the problem.
https://github.com/yyuu/pyenv/wiki/Common-build-problems


BUILD FAILED (SLES 12.1 using python-build 20160726)

Inspect or clean up the working tree at /tmp/python-build.20160801100205.31144
Results logged to /tmp/python-build.20160801100205.31144.log

Last 10 log lines:
(cd /home/xxxxx/.pyenv/versions/3.5.2/share/man/man1; ln -s python3.5.1 python3.1)
if test "xupgrade" != "xno" ; then \
case upgrade in \
upgrade) ensurepip="--upgrade" ;; \
install|*) ensurepip="" ;; \
esac; \
./python -E -m ensurepip \
$ensurepip --root=/ ; \
fi
Ignoring ensurepip failure: pip 8.1.1 requires SSL/TLS

最佳答案

此处有解决构建问题的官方指南 https://github.com/pyenv/pyenv/wiki/common-build-problems

因此对于 openSuse,您必须首先安装依赖项:

zypper in zlib-devel bzip2 libbz2-devel libffi-devel libopenssl-devel \
readline-devel sqlite3 sqlite3-devel xz xz-devel

还有 Ubuntu/Debian:

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git

关于python - 尝试安装 python 时出现错误 : Missing the OpenSSL lib?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38701203/

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