使用 conda 升级到 python 3.8
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/58568175/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Upgrade to python 3.8 using conda
提问by mcguip
Python 3.8.0 is out, but I haven't been able to find any post on how to update to python 3.8 using conda - maybe they will wait for the official release? Any suggestions?
Python 3.8.0 已经发布,但我还没有找到任何关于如何使用 conda 更新到 python 3.8 的帖子——也许他们会等待官方发布?有什么建议?
回答by mcguip
You can update your python version to 3.8 in conda using the command
您可以使用命令在 conda 中将 python 版本更新为 3.8
conda install -c anaconda python=3.8
as per https://anaconda.org/anaconda/python. Though not all packages support 3.8 yet, running
根据https://anaconda.org/anaconda/python。虽然并非所有软件包都支持 3.8,但运行
conda update --all
may resolve some dependency failures. You can also create a new environment called py38 using this command
可能会解决一些依赖失败。您还可以使用此命令创建一个名为 py38 的新环境
conda create -n py38 python=3.8
Edit- note that the conda install
option will potentially take a while to solve the environment, and if you try to abort this midway through you will lose your Python installation (usually this means it will resort to non-conda pre-installed system Python installation).
编辑- 请注意,该conda install
选项可能需要一段时间来解决环境问题,如果您尝试中止此操作,您将丢失 Python 安装(通常这意味着它将求助于非 conda 预安装的系统 Python 安装)。
回答by Nicolas Gervais
Open Anaconda Prompt (base):
打开 Anaconda Prompt(基础):
- Update conda:
- 更新康达:
conda update -n base -c defaults conda
- Create new environment with Python 3.8:
- 使用 Python 3.8 创建新环境:
conda create -n python38 python=3.8
- Activate your new Python 3.8 environment:
- 激活新的 Python 3.8 环境:
conda activate python38
- Start Python 3.8:
- 启动 Python 3.8:
python
回答by Ruben Mejia
Now that the new anaconda individual edition 2020 distribution is out, the procedure that follows is working:
现在新的 anaconda 个人版 2020 发行版已经发布,下面的程序正在运行:
Update conda in your base env:
在您的基础环境中更新 conda:
conda update conda
Create a new environment for Python 3.8, specifying anaconda for the full distribution specification, not just the minimal environment:
为 Python 3.8 创建一个新环境,为完整的分发规范指定 anaconda,而不仅仅是最小环境:
conda create -n py38 python=3.8 anaconda
Activate the new environment:
激活新环境:
conda activate py38
python --version
Python 3.8.1
Number of packages installed: 303
安装的软件包数量:303
Or you can do:
或者你可以这样做:
conda create -n py38 anaconda=2020.02 python=3.8
As per https://www.anaconda.com/anaconda-individual-edition-2020-02/
根据https://www.anaconda.com/anaconda-individual-edition-2020-02/