Reputation: 141
I've been trying to update my Anaconda installation, but whether I run the updater from the GUI or the Terminal via conda update conda
, I receive the error: "NoBaseEnvironmentError: This conda installation has no default base environment."
I don't understand what is going on here. I have successfully run Python 2 and 3 scripts on this computer. Every tutorial I've found assumes a base environment is created by default. When I run conda info --envs
I see an active environment named "base":
# conda environments:
#
base * /Users/MYUSERNAME/anaconda3
ipykernel_py2 /Users/MYUSERNAME/anaconda3/envs/ipykernel_py2
/Users/MYUSERNAME/opt/anaconda3
I'm not well-versed in Python or the command line, so I'd appreciate any help in solving this. I imagine all I need to do is set the base environment, but after much Googling I cannot figure out how to do so. All I want to do is update Anaconda.
conda activate
prior to running update command
conda activate base
prior to running update command
sudo conda update conda
conda update -p /Users/MYUSERNAME/anaconda3 conda
All have resulted in the same error.
I'm running MacOS Catalina 10.15.5
, Conda version 4.7.10
conda info
output:
active environment : base
active env location : /Users/MYUSERNAME/anaconda3
shell level : 1
user config file : /Users/MYUSERNAME/.condarc
populated config files : /Users/MYUSERNAME/.condarc
conda version : 4.7.10
conda-build version : 3.18.8
python version : 3.7.3.final.0
virtual packages :
base environment : /Users/MYUSERNAME/anaconda3 (read only)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /Users/MYUSERNAME/anaconda3/pkgs
/Users/MYUSERNAME/.conda/pkgs
envs directories : /Users/MYUSERNAME/.conda/envs
/Users/MYUSERNAME/anaconda3/envs
platform : osx-64
user-agent : conda/4.7.10 requests/2.22.0 CPython/3.7.3 Darwin/19.5.0 OSX/10.15.5
UID:GID : 501:20
netrc file : None
offline mode : False
conda config --show-sources
output:
==> /Users/MYUSERNAME/.condarc <==
ssl_verify: True
channels:
- defaults
Upvotes: 7
Views: 13257
Reputation: 1
I had the same issue a few months ago. I solved the issue by finding the _conda.exe file in the Anaconda3 directory. Today, I was having issues with finding packages and using pip/conda. I ended up uninstalling anaconda and manually deleting all related files.
All of this to say, make sure you're operating in the 'Anaconda Prompt' application. After running the application, the base environment will be automatically activated. Note that you will have to run the application as an administrator if you downloaded conda to be used by any user on the PC. If you have installed it this way, it will be located in C:\ProgramData\Anaconda3. I suggest adding this to your environment variables to find it easily next time you go in to manage your packages.
Upvotes: 0
Reputation: 150
See if there is a file called history
in ~/anaconda3/conda-meta/
.
If not, create it by writing touch ~/anaconda3/conda-meta/history
.
@igor-rivin has already pointed in the direction of this solution in his comment, the post in question is here
Upvotes: 5
Reputation: 141
I never found the solution to this, but resolved the issue by doing a full clean uninstall of Anaconda using the free trial for App Cleaner Uninstaller. (I first followed uninstall instructions from two different places and still missed a number of key files.)
Upvotes: 2