sibylles
(Sibylle Stöckli)
July 25, 2024, 2:51pm
1
Dear community
I would like to active the conda env where I installed a python package natcap.invest.
I got the following argument error
(base) C:\Users\Sibylle Stöckli>conda activate – C:\Users\Sibylle Stöckli.conda\envs\env-invest
ArgumentError: activate does not accept more than one argument:
[‘–’, ‘C:\Users\Sibylle’, ‘Stöckli\.conda\envs\env-invest’]
(base) C:\Users\Sibylle Stöckli>conda info --envs
conda environments:
base * C:\ProgramData\miniconda3
env-invest C:\Users\Sibylle Stöckli.conda\envs\env-invest
dasha
July 25, 2024, 5:29pm
2
Hey @sibylles
The conda activate
command expects a single argument, but there are extra characters in the command you shared:
A -
after conda activate
A space in \Sibylle Stöckli.conda\
These cause the conda activate
command to treat it as three arguments instead of one. If you remove the -
and the space
, it should work fine. Here is how you would run the command:
conda activate C:\Users\SibylleStöckli.conda\envs\env-invest
You might need to rename Sibylle Stöckli.conda
to remove the space in the name.
sibylles
(Sibylle Stöckli)
July 25, 2024, 5:42pm
3
Many thanks dasha
Is my name a problem with “ö”?
still an error
(base) C:\Users\Sibylle Stöckli>conda activate C:\Users\SibylleStöckli.conda\envs\env-invest
EnvironmentLocationNotFound: Not a conda environment: C:\Users\SibylleStöckli.conda\envs\env-invest
(base) C:\Users\Sibylle Stöckli>
sibylles
(Sibylle Stöckli)
July 25, 2024, 5:48pm
4
It is a fixed user name account. So I need to set up my computer totally new.
Is there another solution, e.g. install conda on another folder?
BrenBarn
(Brendan Barnwell)
July 25, 2024, 8:00pm
5
Normally you would just use the name of the environment, not the full path. So like conda activate env-invest
. Does that work?
sibylles
(Sibylle Stöckli)
July 26, 2024, 5:36am
6
Thank you Brendan
I suppose that I need to first set up the path. Using your code, I got the message, that the system cannot find the path.
Kind regards
Sibylle
BrenBarn
(Brendan Barnwell)
July 26, 2024, 8:57pm
7
Although there is an error, your screenshot seems to show that the environment was activated, since (env-invest)
appeared in the prompt. But it’s possible the error indicates something went wrong during activation. If you do conda activate env-invest
and then do conda info
, what output do you get?
jaimergp
(Jaime RGP)
August 8, 2024, 8:39am
8
Things to try:
conda activate "C:\Users\Sibylle Stöckli\.conda\envs\env-invest"
Navigating to the path and using relative path:
cd "C:\Users\Sibylle Stöckli\.conda\envs"
conda activate .\env-invest
If those don’t work, can you paste the output of:
conda info --envs
dir "C:\Users\Sibylle Stöckli\.conda\envs\env-invest"