PyEnv 中 Ubuntu 20.04 上的 Python 2.7.12

标签 python pyenv ubuntu-20.04

我有一些在 Python 2.7.12 上运行的旧网站,并且刚刚将我的开发机器更新到 Ubuntu 20.04。

我试图让 PyEnv 安装 Python 2.7.12,但这似乎取决于已在 Ubuntu 20.04 中删除的 libssl1.0-dev。

我得到错误:

Installing Python-2.7.12...
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/pyenv/pyenv/wiki/Common-build-problems


BUILD FAILED (Ubuntu 20.04 using python-build 20180424)

以下建议here我跑:
sudo apt-get remove libssl-dev
sudo apt-get update
sudo apt-get install libssl1.0-dev

我得到错误:
E: Package 'libssl1.0-dev' has no installation candidate
有没有办法做到这一点?如果是,那怎么办?

谢谢你。

最佳答案

正如克劳斯提到的,你可以使用 docker image for p ython 2.7 ,但是ssl库非常关键,所以奇怪的是它没有安装候选。包裹libssl-dev为重点上市here

关于PyEnv 中 Ubuntu 20.04 上的 Python 2.7.12,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61612657/

相关文章:

python - 高效的 ndarray 操作

python - tcl-tk (tkinter) 不通过 Homebrew pyenv 在 MacOS Mojave 上安装

python-3.x - Python/Tkinter : ModuleNotFoundError: No module named '_tkinter'

python - 使用 pip3 进行加密安装

Python Shebang 线

yocto - petalinux 项目构建因 m4-native-1.4.18-r0 do_compile 在主机 Ubuntu 20.04 LTS 上失败而失败

ubuntu - 为什么 pip3 软件包没有安装在特定网络上?

opencv_createsamples : command not found ubuntu

python - 带有固定种子的 scipy.sparse.linalg.eigsh

python-3.x - Pyenv:如何在重建 python 后使用 'rebuild' virtualenvs