使用Pyenv安装Python 3.10.5
我想安装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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,你可以。使用
pyenv Update
首先运行pyenv install -list-list
您应该能够看到版本3.10.4
,3.10.5
代码>,3.10.6
,3.11.0
,甚至3.11.1
现在Yes, you can. Use
pyenv update
first then runningpyenv install -list
you should be able to see versions3.10.4
,3.10.5
,3.10.6
,3.11.0
, even3.11.1
now这是类似的情况:
OS:
macOS
,先前安装的旧版本pyenv 1.2.26
- &gt;
pyenv install -l </code>请参阅最新的python版本是
3.10 -dev
,而不是预期的3.10.x
,因此需要升级Pyenv到最新版本,此处<代码> PYENV 2.3.3 :
BREW升级Pyenv
可以列出到最新的
python 3.10.5+
:然后可以使用pyenv install 3.10.6通常:
pyenv install 3.10.6
因此,这里的关键点是::
pyenv 2.3.3
),然后pyenv install -list
可以列表/请参阅最新的python并安装pyenv install 3.10.6
here is similar case:
OS:
macOS
, previously installed old versionpyenv 1.2.26
->
pyenv install -l
see the latest python version is3.10-dev
, not expected3.10.x
so need upgrade pyenv to latest version, here
pyenv 2.3.3
:brew upgrade pyenv
then can list to latest
python 3.10.5+
:then can use pyenv install 3.10.6 normally:
pyenv install 3.10.6
so, here key point is:
pyenv 2.3.3
), thenpyenv install --list
can list/see latest python and install itpyenv install 3.10.6
我认为这是不可能的。
运行
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 as3.10.4
as of this writing.