简体   繁体   中英

Anaconda environment issues

I have installed anaconda navigator and through that I have installed jupyter notebook. I also have anaconda prompt.

The conda info output in prompt is different from the jupyter notebook output

Anaconda Prompt output for conda info:

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:

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 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. 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. If it doesn't work, uninstall both anaconda from your windows. (control panel->uninstall or change a program -> python 3.xx or 2.xx (anaconda3 or 2 etc). you should have two there.

2) install anaconda 3 again but just one.

3) create new environment for different version python you need.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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