62

I'm trying to install python 3.9 in a conda enviroment. I tried creating a new conda env using the following command,

conda create --name myenv python=3.9

But I got an error saying package not found because python 3.9 is not yet released

So, I manually created a folder in envs folder and tried to list all envs. But I couldn't get the manually created new environment.

So, how do I install python 3.9 in a conda env with all functionalities like pip working?

4

3 回答 3

61

要创建 python 3.10 conda 环境,请使用以下命令

conda create -n py310 python=3.10
py310 - environment name

更新 2

您现在可以使用以下命令直接创建 python 3.9 环境

conda create -n py39 python=3.9
py39 - environment name

更新 1

Python 3.9 现在可以在 conda-forge 中使用。

下载 tar 文件 - https://anaconda.org/conda-forge/python/3.9.0/download/linux-64/python-3.9.0-h852b56e_0_cpython.tar.bz2

Anaconda 页面 - https://anaconda.org/conda-forge/python


正如评论中所指出的,python 3.9 还没有出现在任何频道上。因此,它还不能通过 conda 安装。

相反,您可以下载 python 3.9 可执行文件并安装它。

安装完成后,将为 python 3.9 创建一个新的可执行文件,并创建 pip 3.9。

Python:

python3.7          
python3.7-config   
python3.7m         
python3.7m-config  
python3.9          
python3.9-config

点子

pip      
pip3     
pip3.7   
pip3.8   
pip3.9   
pipreqs

为了为 python 3.9 安装 ipython,

pip3.9 install ipython
于 2020-08-04T05:41:23.297 回答
23

2020 年 10 月 6 日,Python 3.9 在 conda-forge 上可用:https ://anaconda.org/conda-forge/python 。但是,大多数其他包(包括创建基本环境的一些必需品)还没有明确支持 Python 3.9。

但是(截至 2020 年 10 月 15 日),基本依赖项似乎已修复,以下命令现在可以使用:

conda create -c conda-forge python=3.9 -n py39-demo
于 2020-10-06T22:34:14.290 回答
13

你现在可以简单地运行

conda create --name myenv python=3.9

它会简单地创建你的 python 3.9 虚拟环境。

于 2020-11-05T08:17:51.487 回答