When I try to activate my environment (which has worked before), nothing happens. Is the only way to fix this is reinstalling everything? I have tried changing environment variables etc, but nothing works.
You can have more clues with conda info --envs
Environments are installed by default into the envs directory in your conda directory.
Note: In Windows it is good practice to deactivate one environment before activating another.
If source activate does not set the environment variables properly, you can set them manually
See also troubleshooting:
Reactivate the environment or run
hash -r
(in bash) orrehash
(in zsh)When you run
source activate
, conda automatically runshash -r
in bash andrehash
in zsh to clear the hashed commands, so conda will find things in the new path on thePATH
.This is a relatively rare problem, since this will only happen if you activate an environment or use the root environment, run a command from somewhere else, then conda install a program and try to run the program again without running source activate or source deactivate.
The command
type command_name
will always tell you exactly what is being run (this is better than which command_name, which ignores hashed commands and searches thePATH
directly), andhash -r
(in bash) orrehash
(in zsh) will reset the hash, or you can runsource activate
.
Finally, note there are issues with Cygwin or MsysGit bash:
activate.bat
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With