Reputation: 35
I can't write (and therefore install packages) to the C:\Anaconda\envs\
folder, but even after changing the envs directories variable to point to a new path the activate
command does not work.
Any suggestions? I looked at the activate.py script, but don't see an error message that matches mine or where to change the file path
Working in Windows-64. Not in powershell. Not sure how to manually edit my PATH. Already looked at Conda virtual envinment not changing under Windows - similar issue
I also didn't have success with this similar post: How to activate an Anaconda environment
The activate.bat file is what is generating the error at line 24, but I'm not sure how to fix it. Seems like the ANACONDA_ENVS is set in line 4, but I have no idea what ANACONDA_ENVS=%%~fi means
Upvotes: 0
Views: 2777
Reputation: 1
To solve this I modified the header of the activate.bat copy from "my_root\Scripts" folder and added fixed path:
for /f "delims=" %%i in ("%~dp0..\envs") do (
set ANACONDA_ENVS=C:\Users\yourusername\.conda\envs
)
This means that I had to execute in the prompt
C:\Users\yourusername\.conda\envs\Scripts\activate my_root
specifying the full path.
Upvotes: 0
Reputation: 36608
Try adding a new path variable to your .condarc file (NOTE: this assumes %USERPROFILE%
is your C:\Users\USERNAME directory used above)
conda config --prepend envs_dirs %USERPROFILE%/.conda/envs
Close and reopen CMD and try
activate my_root
Upvotes: 1
Reputation: 85442
Type:
activate C:\Users\N029810\.conda\envs\my_root
The prompt should change to:
(my_root)
Now, you should be able to install packages:
conda install <apackage>
Upvotes: 0