当前位置:   article > 正文

anaconda安装python3.7、jupyter_Anaconda2已安装过python2.7的情况下安装python3,并在jupyter notebook中添加python3...

anaconda安装python3.7、jupyter_Anaconda2已安装过python2.7的情况下安装python3,并在jupyter notebook中添加python3...

1.在控制台(cmd)输入

conda info -e

2.conda create --name snake python=3

##系统会自动在envs目录下创建文件夹snake

3.通过指令activat和deactivate能够切换环境

代码如下:

C:\Users\Administrator>conda -V

conda 4.6.9

C:\Users\Administrator>python -V

Python 2.7.13 :: Anaconda 4.0.0 (64-bit)

C:\Users\Administrator>conda info -e

# conda environments:

#

base * F:\Anaconda2

gl-env F:\Anaconda2\envs\gl-env

C:\Users\Administrator>conda create --name snake python=3

##python=3,这样写的好处是系统会自动下载和你环境匹配的python3.*

#

# To activate this environment, use:

# > activate snake

#

# To deactivate an active environment, use:

# > deactivate

#

# * for power-users using bash, you must source

#

验证是否安装成功

C:\Users\Administrator>conda -V

conda 4.6.9

C:\Users\Administrator>python -V

Python 2.7.13 :: Anaconda 4.0.0 (64-bit)

C:\Users\Administrator>activate snake

(snake) C:\Users\Administrator>conda -V

conda 4.6.9

(snake) C:\Users\Administrator>python -V

Python 3.7.3

非常感谢下边这位老哥:https://www..com/wxshi/p/6805120.html

因为我之前在jupyter notebook中已经有Python2,现在怎么添加python3呢?

C:\Users\Administrator>activate F:\Anaconda2\envs\snake

(snake) C:\Users\Administrator>python -m ipykernel install --user

Installed kernelspec python3 in C:\Users\Administrator\AppData\Roaming\jupyter\kernels\python3

(snake) C:\Users\Administrator>jupyter notebook

e0e448bd8cf4ab717697b1e99bf9b8c7.png

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/639271
推荐阅读
相关标签
  

闽ICP备14008679号