Anaconda Not in Default Directory
Zoher15 opened this issue · 15 comments
On the Sublime Text toolbar go to Preferences->Package Settings->Conda->Settings - User.
Change the values in that file to the location of your install. If the user settings file is empty, copy the contents from Settings - Default into Settings - User and then change the values.
Hey Mandeep, that was my initial intuition and that is exactly what I had done. But I had errors while importing packages like NLTK that were already installed. Do you have any suggestions?
Could you show me what kind of errors you're getting? With the paths in the settings file changed, you would then need to activate the root environment or another conda environment via the Conda: Activate
command.
Is the Conda
build system selected in Tools->Build System?
Yes Mandeep
Is something wrong with my custom path?
Your directory is C:\Users\zoya\Anaconda2
but the directory in settings is listed as ~/anaconda2/
. I'm not familiar with how Windows handles filenames but does the plugin work if you capitalize the A in the anaconda2 path?
I tried capitalizing as well as entering the entire path
I even installed nltk using conda just to check. Did not work. I cant find an .condarc file for some reason
If you write import sys
in a Python file and print(sys.executable)
does the correct path show? Are you able to import any other packages in your environment? According to your conda info screenshot your config file is in C:\Users\zoya\.condarc
, however I don't think it matters in this case .I'm unable to replicate this which is why I'm trying to see what exactly could be causing this on your system.
It goes to C:\Python27\python.exe
despite setting my user settings as
// Default settings for sublime-text-conda:
{
// executable is the path to anaconda's python
// this python executable is used in order to find conda
"executable": "C:\Users\zoya\Anaconda2",
// Directory in which the conda envs are stored
// Default location is the user's home directory
"environment_directory": "C:\\Users\\zoya\\Anaconda2\\envs",
// configuration is the path to conda's configuration file
"configuration": "~/.condarc"
}
So we've narrowed it down to the path. When you open the command palette and select Conda: Activate Environment
are you able to select your environment? If so, does anything appear in the status bar after selecting the env?
Yes on doing all of the steps again I fixed it to the right path and was able to activate it. It is working now!
Thank you for your patience Mandeep 👍 Really appreciate your promptness :)
best,
Zoher
Glad everything worked out! 👍