mac修改默认python版本_Anaconda/MacOS:更改默认python版本

好吧,我在连续体邮件列表中发现了类似的问题。

通过conda重新安装python解决了这个问题$ conda install python=2.7

Fetching package metadata: ..

Solving package specifications: .

Package plan for installation in environment /Users/kadu/anaconda:

The following packages will be downloaded:

package | build

---------------------------|-----------------

conda-3.5.2 | py27_0 135 KB

pycosat-0.6.1 | py27_0 57 KB

python-2.7.6 | 2 16.5 MB

pyyaml-3.11 | py27_0 149 KB

requests-2.3.0 | py27_0 564 KB

------------------------------------------------------------

Total: 17.4 MB

The following packages will be UN-linked:

package | build

---------------------------|-----------------

conda-3.5.2 | py34_0

pycosat-0.6.1 | py34_0

python-3.4.1 | 0

pyyaml-3.11 | py34_0

requests-2.3.0 | py34_0

The following packages will be linked:

package | build

---------------------------|-----------------

conda-3.5.2 | py27_0 hard-link

pycosat-0.6.1 | py27_0 hard-link

python-2.7.6 | 2 hard-link

pyyaml-3.11 | py27_0 hard-link

requests-2.3.0 | py27_0 hard-link

Proceed ([y]/n)?

这也可用于更改在anaconda环境下的默认包:$ conda install python=3.4

Fetching package metadata: ..

Solving package specifications: .

Package plan for installation in environment /Users/kadu/anaconda:

The following packages will be UN-linked:

package | build

---------------------------|-----------------

conda-3.5.2 | py27_0

pycosat-0.6.1 | py27_0

python-2.7.6 | 2

pyyaml-3.11 | py27_0

requests-2.3.0 | py27_0

The following packages will be linked:

package | build

---------------------------|-----------------

conda-3.5.2 | py34_0 hard-link

pycosat-0.6.1 | py34_0 hard-link

python-3.4.1 | 0 hard-link

pyyaml-3.11 | py34_0 hard-link

requests-2.3.0 | py34_0 hard-link

Proceed ([y]/n)?

但是,这需要手动将生成更改为您使用的任何其他包。我不得不重新安装spyder,这似乎在一开始就造成了这个错误,大概是在我试图以错误的版本启动spyder时重新安装的。所有其他的库,我没有尝试重新安装,仍然在2.7下运行良好。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值