简体   繁体   English

Anaconda环境问题

[英]Anaconda environment issues

I have installed anaconda navigator and through that I have installed jupyter notebook. 我安装了anaconda导航器,并通过它安装了jupyter笔记本。 I also have anaconda prompt. 我也有蟒蛇提示。

The conda info output in prompt is different from the jupyter notebook output 提示中的conda信息输出与jupyter笔记本输出不同

Anaconda Prompt output for conda info: Anaconda提示输出的conda信息:

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 output for the same: Jupyter的输出相同:

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 list output: conda env列表输出:

# conda environments:
#
base                  *  C:\Users\***\Anaconda2
                         C:\Users\***\AppData\Local\Continuum\anaconda3

I have looked into this but didn't help. 我已研究过这个 ,但没有帮助。 I believe this lack of sync in the environments is causing problems to installing more packages. 我相信环境中缺乏同步会导致安装更多软件包的问题。 On running the same command in these environments, I get different errors(obvious). 在这些环境中运行相同的命令时,我得到不同的错误(显而易见)。 How do I change the environment in the anaconda prompt to anaconda3 as the active env. 我如何将anaconda提示符下的环境更改为anaconda3作为活动环境。 So that any installations from the prompt will reflect the same in the notebook. 这样,提示符下的所有安装都将在笔记本中反映出来。

Any help is appreciated. 任何帮助表示赞赏。

my recommendation would be: 我的建议是:

1) uninstall the older version of anaconda(in this case anaconda2) and you can skip other steps if it works. 1)卸载旧版本的anaconda(在本例中为anaconda2),如果可以,则可以跳过其他步骤。 If it doesn't work, uninstall both anaconda from your windows. 如果它不起作用,请从Windows卸载两个anaconda。 (control panel->uninstall or change a program -> python 3.xx or 2.xx (anaconda3 or 2 etc). you should have two there. (控制面板->卸载或更改程序-> python 3.xx或2.xx(anaconda3或2等)。您应该在那里有两个。

2) install anaconda 3 again but just one. 2)再次安装anaconda 3,但只需安装一个。

3) create new environment for different version python you need. 3)为您需要的不同版本的python创建新环境。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM