Conda activate Invoke-Expression error

In a project, I noticed that conda was not activated in my PowerShell, Whenever I attempt to run the

conda activate base

command I get the following set of errors;

Invoke-Expression : At line:1 char:295
+ ... conda3\condabin;C:\Python310\Scripts;C:\Python310;"C:\Program Files\n ...
+ ~~~~~~~~~~
Unexpected token 'C:\Program' in expression or statement.
At C:\ProgramData\Anaconda3\shell\condabin\Conda.psm1:101 char:9
+ Invoke-Expression -Command $activateCommand;
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ParserError: (:) [Invoke-Expression], ParseException + FullyQualifiedErrorId : UnexpectedToken,Microsoft.PowerShell.Commands.InvokeExpressionCommand

A previous post has a very similar question, with one of the comments informing me to check the double quotes on C:\Program files...

I couldn't understand which file this has occurred, A glance through the .psm1 file informed under the unexpected token error does not show any of the above-mentioned paths.

1 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like