Activate conda env

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

Hey @sibylles :slight_smile:

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.

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>

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?

Normally you would just use the name of the environment, not the full path. So like conda activate env-invest. Does that work?

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

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?

Things to try:

  • Quoting the full path:
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"