Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
302 views
in Technique[技术] by (71.8m points)

python - PackageNotInstalledError: Package is not installed in prefix

conda update conda >> successful

conda update anaconda >> gives me error saying package is not installed in prefix.

I have single installation of Python distribution on my system. How do I solve this issue?

(base) C:Usersasukumari>conda info
 active environment : base
active env location : C:UsersasukumariAppDataLocalContinuumanaconda3
        shell level : 1
   user config file : C:Usersasukumari.condarc  populated config files : C:Usersasukumari.condarc
      conda version : 4.5.9
conda-build version : 3.4.1
     python version : 3.6.4.final.0
   base environment : C:UsersasukumariAppDataLocalContinuumanaconda3  (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:UsersasukumariAppDataLocalContinuumanaconda3pkgs
                      C:UsersasukumariAppDataLocalcondacondapkgs
   envs directories : C:UsersasukumariAppDataLocalContinuumanaconda3envs
                      C:UsersasukumariAppDataLocalcondacondaenvs
                      C:Usersasukumari.condaenvs
           platform : win-64
         user-agent : conda/4.5.9 requests/2.18.4 CPython/3.6.4 Windows/10 Windows/10.0.16299
      administrator : False
         netrc file : None
       offline mode : False
question from:https://stackoverflow.com/questions/51712693/packagenotinstallederror-package-is-not-installed-in-prefix

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Usually this error, "PackageNotInstalledError: Package is not installed in prefix." is because your custom environment doesn't have the conda infrastructure. Instead, it is in your base only. To update the base environment:

conda update --name base conda

To see what version you have installed:

conda list --name base conda

example output of list;

# packages in environment at /Users/me/miniconda2:
#
# Name                    Version                   Build  Channel
conda                     4.6.14                   py27_0  
conda-env                 2.6.0                h36134e3_0  

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...