在创建新环境时,是否可以更改python anaconda安装的默认版本?

2024-09-23 06:24:32 发布

您现在位置:Python中文网/ 问答频道 /正文

我快速搜索了一下,但实际上找不到我问题的答案

当您创建新环境而不指定python版本时,anaconda是否默认为python的最新版本

最后一段时间,我创建的每个环境都使用3.7.6。不久前,我更新了我的anaconda,并去创建一个新环境,它是3.8.1

执行conda search python返回以下内容:

Loading channels: done
# Name                       Version           Build  Channel
python                        2.7.12               0  conda-forge
python                        2.7.12               1  conda-forge
python                        2.7.12               2  conda-forge
python                        2.7.13               1  conda-forge
python                        2.7.13     h1b6d89f_16  pkgs/main
python                        2.7.13     h9912b81_15  pkgs/main
python                        2.7.13     hb034564_12  pkgs/main
python                        2.7.14               0  conda-forge
python                        2.7.14               1  conda-forge
python                        2.7.14               2  conda-forge
python                        2.7.14               3  conda-forge
python                        2.7.14               4  conda-forge
python                        2.7.14               5  conda-forge
python                        2.7.14     h2765ee6_18  pkgs/main
python                        2.7.14     h3e68818_15  pkgs/main
python                        2.7.14     h4084c39_22  pkgs/main
python                        2.7.14     h4a10d90_30  pkgs/main
python                        2.7.14     h4a10d90_31  pkgs/main
python                        2.7.14     h59f5a59_20  pkgs/main
python                        2.7.14     h819644d_16  pkgs/main
python                        2.7.14     h8c3f1cb_23  pkgs/main
python                        2.7.15               0  conda-forge
python                        2.7.15      h2880e7c_0  conda-forge
python                        2.7.15   h2880e7c_1001  conda-forge
python                        2.7.15   h2880e7c_1002  conda-forge
python                        2.7.15   h2880e7c_1003  conda-forge
python                        2.7.15   h2880e7c_1004  conda-forge
python                        2.7.15   h2880e7c_1005  conda-forge
python                        2.7.15   h2880e7c_1006  conda-forge
python                        2.7.15   h2880e7c_1008  conda-forge
python                        2.7.15   h2880e7c_1009  conda-forge
python                        2.7.15      h2880e7c_2  pkgs/main
python                        2.7.15      h2880e7c_3  pkgs/main
python                        2.7.15      h2880e7c_4  pkgs/main
python                        2.7.15     hcb6e200_15  pkgs/main
python                        2.7.15      hcb6e200_5  pkgs/main
python                        2.7.15      hcb6e200_7  pkgs/main
python                        2.7.15      he216670_0  pkgs/main
python                        2.7.16      hcb6e200_0  pkgs/main
python                        2.7.17      h930f6bb_0  pkgs/main
python                         3.4.5               0  conda-forge
python                         3.4.5               1  conda-forge
python                         3.4.5               2  conda-forge
python                         3.5.1               0  conda-forge
python                         3.5.1               1  conda-forge
python                         3.5.2               0  conda-forge
python                         3.5.2               1  conda-forge
python                         3.5.2               2  conda-forge
python                         3.5.2               3  conda-forge
python                         3.5.2               4  conda-forge
python                         3.5.2               5  conda-forge
python                         3.5.3               0  conda-forge
python                         3.5.3               1  conda-forge
python                         3.5.3               2  conda-forge
python                         3.5.3               3  conda-forge
python                         3.5.4               0  conda-forge
python                         3.5.4               1  conda-forge
python                         3.5.4               2  conda-forge
python                         3.5.4               3  conda-forge
python                         3.5.4     h1357f44_23  pkgs/main
python                         3.5.4     hc495aa9_21  pkgs/main
python                         3.5.4     hd3c4935_11  pkgs/main
python                         3.5.4     hdec4e59_20  pkgs/main
python                         3.5.4     hedc2606_15  pkgs/main
python                         3.5.5               0  conda-forge
python                         3.5.5               1  conda-forge
python                         3.5.5      h0c2934d_0  pkgs/main
python                         3.5.5      h0c2934d_1  pkgs/main
python                         3.5.5      h0c2934d_2  pkgs/main
python                         3.5.5      he025d50_2  conda-forge
python                         3.5.6      he025d50_0  pkgs/main
python                       3.6.0a3               0  conda-forge
python                       3.6.0a4               0  conda-forge
python                       3.6.0b1               0  conda-forge
python                       3.6.0b2               0  conda-forge
python                       3.6.0b3               0  conda-forge
python                       3.6.0b4               0  conda-forge
python                      3.6.0rc1               0  conda-forge
python                         3.6.0               0  conda-forge
python                         3.6.0               1  conda-forge
python                         3.6.0               2  conda-forge
python                         3.6.1               0  conda-forge
python                         3.6.1               1  conda-forge
python                         3.6.1               2  conda-forge
python                         3.6.1               3  conda-forge
python                         3.6.2               0  conda-forge
python                         3.6.2     h09676a0_15  pkgs/main
python                         3.6.2     h6679aeb_11  pkgs/main
python                         3.6.3               0  conda-forge
python                         3.6.3               1  conda-forge
python                         3.6.3               2  conda-forge
python                         3.6.3               3  conda-forge
python                         3.6.3               4  conda-forge
python                         3.6.3      h210ce5f_2  pkgs/main
python                         3.6.3      h3389d20_0  pkgs/main
python                         3.6.3      h3b118a2_4  pkgs/main
python                         3.6.3      h9e2ca53_1  pkgs/main
python                         3.6.4               0  conda-forge
python                         3.6.4      h0c2934d_2  pkgs/main
python                         3.6.4      h0c2934d_3  pkgs/main
python                         3.6.4      h6538335_0  pkgs/main
python                         3.6.4      h6538335_1  pkgs/main
python                         3.6.5               0  conda-forge
python                         3.6.5               1  conda-forge
python                         3.6.5      h0c2934d_0  pkgs/main
python                         3.6.6      he025d50_0  conda-forge
python                         3.6.6      hea74fb7_0  pkgs/main
python                         3.6.7      h33f27b4_0  pkgs/main
python                         3.6.7      h33f27b4_1  pkgs/main
python                         3.6.7      h9f7ef89_2  pkgs/main
python                         3.6.7   he025d50_1002  conda-forge
python                         3.6.7   he025d50_1004  conda-forge
python                         3.6.7   he025d50_1005  conda-forge
python                         3.6.7   he025d50_1006  conda-forge
python                         3.6.8      h9f7ef89_0  pkgs/main
python                         3.6.8      h9f7ef89_1  pkgs/main
python                         3.6.8      h9f7ef89_7  pkgs/main
python                         3.6.9      h5500b2f_0  pkgs/main
python                        3.6.10      h9f7ef89_0  pkgs/main
python                         3.7.0      h1ce479f_0  conda-forge
python                         3.7.0      hc182675_1  conda-forge
python                         3.7.0   hc182675_1002  conda-forge
python                         3.7.0   hc182675_1003  conda-forge
python                         3.7.0   hc182675_1004  conda-forge
python                         3.7.0   hc182675_1005  conda-forge
python                         3.7.0   hc182675_1006  conda-forge
python                         3.7.0      hea74fb7_0  pkgs/main
python                         3.7.1      h33f27b4_3  pkgs/main
python                         3.7.1      h33f27b4_4  pkgs/main
python                         3.7.1      h8c8aaf0_6  pkgs/main
python                         3.7.1   h9460c21_1002  conda-forge
python                         3.7.1   h9460c21_1003  conda-forge
python                         3.7.1   hc182675_1000  conda-forge
python                         3.7.1   hc182675_1001  conda-forge
python                         3.7.1      he44a216_5  pkgs/main
python                         3.7.2      h8c8aaf0_0  pkgs/main
python                         3.7.2     h8c8aaf0_10  pkgs/main
python                         3.7.2      h8c8aaf0_2  pkgs/main
python                         3.7.2      hb12ca83_0  conda-forge
python                         3.7.3      h510b542_1  conda-forge
python                         3.7.3      h8c8aaf0_0  pkgs/main
python                         3.7.3      h8c8aaf0_1  pkgs/main
python                         3.7.3      hb12ca83_0  conda-forge
python                         3.7.4      h5263a28_0  pkgs/main
python                         3.7.5      h8c8aaf0_0  pkgs/main
python                         3.7.6      h5b45d93_1  conda-forge
python                         3.7.6      h5b45d93_2  conda-forge
python                         3.7.6      h60c2a47_2  pkgs/main
python                         3.8.0      hc9e8b01_0  conda-forge
python                         3.8.0      hc9e8b01_1  conda-forge
python                         3.8.0      hc9e8b01_2  conda-forge
python                         3.8.0      hc9e8b01_3  conda-forge
python                         3.8.0      hc9e8b01_5  conda-forge
python                         3.8.0      hff0d562_0  pkgs/main
python                         3.8.0      hff0d562_1  pkgs/main
python                         3.8.0      hff0d562_2  pkgs/main
python                         3.8.1      h5fd99cc_1  pkgs/main
python                         3.8.1      he1f5543_1  conda-forge
python                         3.8.1      he1f5543_2  conda-forge

我知道我可以用3.7创建一个新环境,方法是:

conda create --name test python=3.7 anaconda

但是每次都要指明这一点很烦人

是否可以更改创建新环境时安装的anaconda的默认版本?所以我不必指定它

谢谢


Tags: 环境mainanacondacondaforgepkgsh0c2934dhe025d50