Anaconda environment issues
我安装了Python导航仪,通过它我安装了Jupyter笔记本。我还有Python提示。
提示中的Conda信息输出与Jupyter笔记本电脑输出不同
Conda信息的Anaconda提示输出:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | active environment : base active env location : C:\Users\***\Anaconda2 shell level : 1 user config file : C:\Users\***\.condarc populated config files : C:\Users\***\.condarc conda version : 4.5.12 conda-build version : 3.0.19 python version : 2.7.13.final.0 base environment : C:\Users\***\Anaconda2 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/win-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/free/win-64 https://repo.anaconda.com/pkgs/free/noarch https://repo.anaconda.com/pkgs/r/win-64 https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/pro/win-64 https://repo.anaconda.com/pkgs/pro/noarch https://repo.anaconda.com/pkgs/msys2/win-64 https://repo.anaconda.com/pkgs/msys2/noarch package cache : C:\Users\***\Anaconda2\pkgs C:\Users\***\AppData\Local\conda\conda\pkgs envs directories : C:\Users\***\Anaconda2\envs C:\Users\***\AppData\Local\conda\conda\envs C:\Users\***\.conda\envs platform : win-64 user-agent : conda/4.5.12 requests/2.14.2 CPython/2.7.13 Windows/10 Windows/10.0.17134 administrator : False netrc file : None offline mode : False |
Jupyter输出相同:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | active environment : base active env location : C:\Users\***\AppData\Local\Continuum\anaconda3 user config file : C:\Users\***\.condarc populated config files : C:\Users\***\.condarc conda version : 4.5.4 conda-build version : 3.10.5 python version : 3.6.5.final.0 base environment : C:\Users\***\AppData\Local\Continuum\anaconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/win-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/free/win-64 https://repo.anaconda.com/pkgs/free/noarch https://repo.anaconda.com/pkgs/r/win-64 https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/pro/win-64 https://repo.anaconda.com/pkgs/pro/noarch https://repo.anaconda.com/pkgs/msys2/win-64 https://repo.anaconda.com/pkgs/msys2/noarch package cache : C:\Users\***\AppData\Local\Continuum\anaconda3\pkgs C:\Users\***\AppData\Local\conda\conda\pkgs envs directories : C:\Users\***\AppData\Local\Continuum\anaconda3\envs C:\Users\***\AppData\Local\conda\conda\envs C:\Users\***\.conda\envs platform : win-64 user-agent : conda/4.5.4 requests/2.18.4 CPython/3.6.5 Windows/10 Windows/10.0.17134 administrator : False netrc file : None offline mode : False |
Conda env列表输出:
1 2 3 4 | # conda environments: # base * C:\Users\***\Anaconda2 C:\Users\***\AppData\Local\Continuum\anaconda3 |
我已经调查过了,但没有帮助。我认为环境中缺乏同步会导致安装更多软件包的问题。在这些环境中运行相同的命令时,我会得到不同的错误(很明显)。如何将Python提示中的环境更改为Python3作为活动环境。这样,提示中的任何安装都将反映在笔记本中。
感谢您的帮助。
我的建议是:
1)卸载旧版本的水蟒(在本例中为水蟒2),如果可以,您可以跳过其他步骤。如果它不起作用,从你的窗口卸载两个Python。(控制面板->卸载或更改程序->python 3.xx或2.xx(anaconda3或2等)。你应该有两个。
2)再次安装水蟒3,但只安装一个。
3)为您需要的不同版本的python创建新的环境。