使用Pyenv安装Python 3.10.5

发布于 2025-02-08 04:10:37 字数 1152 浏览 3 评论 0原文

我想安装Python 3.10.5(或至少Python> = 3.7。)。我关注这些指令

# Step 1. Install pyenv

git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bashrc

# Step 2. Install missing headers for all the Python modules to be built

sudo zypper install readline-devel sqlite3-devel libbz2-devel

# Step 3. Install the desired Python version

pyenv install 3.10.5

直到我到达pyenv install 3.10.5

bscuser@localhost:~> pyenv install 3.10.5
/home/bscuser/.pyenv/plugins/python-build/share/python-build/3.7.13: line 1: prefer_openssl11: command not found

BUILD FAILED (openSUSE 15.3 using python-build 20180424)

我觉得我觉得很喜欢它应与此文件< /a>。

我该如何解决?

I want to install Python 3.10.5 (or at least Python >= 3.7.). I followed these instructions:

# Step 1. Install pyenv

git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bashrc

# Step 2. Install missing headers for all the Python modules to be built

sudo zypper install readline-devel sqlite3-devel libbz2-devel

# Step 3. Install the desired Python version

pyenv install 3.10.5

until I got to pyenv install 3.10.5:

bscuser@localhost:~> pyenv install 3.10.5
/home/bscuser/.pyenv/plugins/python-build/share/python-build/3.7.13: line 1: prefer_openssl11: command not found

BUILD FAILED (openSUSE 15.3 using python-build 20180424)

I feel like it should be related to this file.

How do I solve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

挽袖吟 2025-02-15 04:10:37

是的,你可以。使用pyenv Update首先运行pyenv install -list-list您应该能够看到版本3.10.43.10.5代码>,3.10.63.11.0,甚至3.11.1现在

Yes, you can. Use pyenv update first then running pyenv install -list you should be able to see versions 3.10.4, 3.10.5, 3.10.6, 3.11.0, even 3.11.1 now

秋意浓 2025-02-15 04:10:37

这是类似的情况:

OS:macOS,先前安装的旧版本pyenv 1.2.26

- &gt; pyenv install -l <​​/code>请参阅最新的python版本是3.10 -dev,而不是预期的3.10.x

因此需要升级Pyenv到最新版本,此处<代码> PYENV 2.3.3 :

  • 在MacOS上:BREW升级Pyenv
    • 您可以参考官方doc 安装/升级到最新的Pyenv

可以列出到最新的python 3.10.5+

> pyenv install --list | grep 3.10
...
  3.10.0
  3.10-dev
  3.10.1
  3.10.2
  3.10.3
  3.10.4
  3.10.5
  3.10.6
  mambaforge-4.10.3-10
  miniconda-3.10.1
...

然后可以使用pyenv install 3.10.6通常:

pyenv install 3.10.6

因此,这里的关键点是::

  • 将Pyenv升级到最新版本(此处pyenv 2.3.3),然后pyenv install -list可以列表/请参阅最新的python并安装pyenv install 3.10.6

here is similar case:

OS: macOS, previously installed old version pyenv 1.2.26

-> pyenv install -l see the latest python version is 3.10-dev, not expected 3.10.x

so need upgrade pyenv to latest version, here pyenv 2.3.3:

  • on macOS: brew upgrade pyenv
    • you can refer official doc to install/upgrade to latest pyenv

then can list to latest python 3.10.5+:

> pyenv install --list | grep 3.10
...
  3.10.0
  3.10-dev
  3.10.1
  3.10.2
  3.10.3
  3.10.4
  3.10.5
  3.10.6
  mambaforge-4.10.3-10
  miniconda-3.10.1
...

then can use pyenv install 3.10.6 normally:

pyenv install 3.10.6

so, here key point is:

  • upgrade pyenv to latest version (here pyenv 2.3.3), then pyenv install --list can list/see latest python and install it pyenv install 3.10.6
怂人 2025-02-15 04:10:37

我认为这是不可能的。
运行pyenv install -list将为您提供可以安装的所有可能的Python版本的列表,并且它只会延伸至3.10.4,范围在撰写本文的情况下。

I don't think that's possible.
Running pyenv install -list will give you a list of all possible python versions that can be installed, and it will only go as far as 3.10.4 as of this writing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文