本文介绍了pyenv版本在mac big sur上安装其他版本的python后不显示任何内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么不显示我的python版本安装

why it doesnt show my python version installations

% pyenv versions
* system (set by /Users/axilaris/.pyenv/version)

我知道我有Python 3.6(Big Sur随附)以及3.8和3.9(我已经使用Python .pkg安装程序进行安装- https://www.python.org/downloads/)

I know I have Python 3.6 (that comes with Big Sur) and 3.8 and 3.9 (I have installed using Python .pkg installer - https://www.python.org/downloads/)

我已经使用安装了pyenv.

I have installed pyenv using

brew install pyenv

更新(这是我在Mac中发现的现有python):

UPDATE (here are existing python I found existing in my mac):

% pwd
/Library/Frameworks/Python.framework/Versions
% ls -al
total 0
drwxrwxr-x   6 root  wheel  192 Jan 11 14:18 .
drwxr-xr-x   6 root  wheel  192 Jan 11 14:18 ..
drwxrwxr-x  10 root  admin  320 Nov  8  2017 3.6
drwxrwxr-x  10 root  admin  320 Jan  2 18:24 3.8
drwxrwxr-x  11 root  admin  352 Jan 11 14:18 3.9
lrwxr-xr-x   1 root  wheel    3 Jan 11 14:18 Current -> 3.9
% python -V
Python 2.7.16
% python3 -V
Python 3.9.1


in another location

% ls -al
total 0
drwxr-xr-x   7 root  wheel  224 Jan  1  2020 .
drwxr-xr-x   5 root  wheel  160 Jan  1  2020 ..
lrwxr-xr-x   1 root  wheel    3 Jan  1  2020 2.3 -> 2.7
lrwxr-xr-x   1 root  wheel    3 Jan  1  2020 2.5 -> 2.7
lrwxr-xr-x   1 root  wheel    3 Jan  1  2020 2.6 -> 2.7
drwxr-xr-x  11 root  wheel  352 Jan  1  2020 2.7
lrwxr-xr-x   1 root  wheel    3 Jan  1  2020 Current -> 2.7
% pwd
/System/Library/Frameworks/Python.framework/Versions

推荐答案

您需要使用pyenv这样安装,例如: pyenv install 3.7.4 .然后,它将列出那些Python安装.我在大苏尔(Big Sur)上,对我来说很好.祝你好运!

You need to install with pyenv like this, for example: pyenv install 3.7.4. Then it will list those Python installations, as well. I'm on Big Sur, and it's working fine for me. Best of luck!

这篇关于pyenv版本在mac big sur上安装其他版本的python后不显示任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 07:13