繁体   English   中英

在 MacOS 上安装和配置最新的 python 3.8 的问题

[英]Problem in installing and configuring latest python 3.8 on MacOS

我一直在尝试通过自制软件在 MacOS 上安装 Python 3.8,但最终我得到了许多版本的 Python。

$ which python3
$ /Library/Frameworks/Python.framework/Versions/3.6/bin/python3

$ cd /Library/Frameworks/Python.framework/Versions
$ ls
$ 3.6   3.8

如何修复它以便将 3.8 设为默认的 Python 版本?

据我所知,目前我们仍在努力迁移到 Python 3.8(太多的 Homebrew 公式依赖项和 Jenkins CI 经常耗尽磁盘空间)。

这是大型问题跟踪器: Github python 3.8 migration issue

目前,我建议使用pyenv ,我也使用它来管理多个 python 版本以进行开发。

以下是您需要做的:

  • brew install pyenv
  • pyenv init
  • eval "$(pyenv init -)" # 确保为以后的 shell 会话echo 'eval "$(pyenv init -)"' > ~/.bash_profile
  • pyenv install 3.8.0
  • pyenv global 3.8.0

然后你就可以走了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM