为什么它不显示我的 python 版本安装
brew install pyenv
我知道我有 Python 3.6(Big Sur 附带的)以及 3.8 和 3.9(我已经使用 Python .pkg 安装程序安装 - https://www.python.org/downloads/)
我已经使用
安装了pyenv% 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
更新(这里是我在我的 mac 中发现的现有 python):
app= Flask(__name__)
@app.route('/')
def hello (x):
x=data
return f"{x}"
data =pd.read_csv("Path\\file.csv")
答案 0 :(得分:0)
pyenv versions
仅显示由 pyenv
答案 1 :(得分:0)
您需要像这样使用 pyenv 进行安装,例如:pyenv install 3.7.4
。然后它也会列出那些 Python 安装。我在大苏尔,对我来说效果很好。祝你好运!