Reputation: 63
installed Python 3.7.3 and Anaconda and tried to activate it in the Anaconda Prompt.
activate %PATH%
but i get the error
activate does not accept more than one argument
What can I do about it ?
Upvotes: 1
Views: 9669
Reputation: 605
If you use Linux you can start conda with command (assuming that conda was installed @ ~/miniconda3/
)
source ~/miniconda3/bin/activate
or
source [conda_install_path]/bin/activate
or
source [conda_install_path]/bin/activate base
By default, (base)
virtual environment is loaded.
You can switch to a different environment by
conda activate [env_name]
A sorter path is to type directly
source [conda_install_path]/bin/activate [env_name]
As usual, you can avoid re-typing activation commands every time by augmenting the .bash_rc script
Upvotes: 0
Reputation: 1
yes writing your argument in a closed quote worked for me if there is a space in between characters. So here's what I did with my issue:
>>> conda activate "C:\Users\Name\Desktop\sample_project_1\env"
Upvotes: 0
Reputation: 3215
If you have space in path
, please try this
activate "C:\Users\USER\New Project\"
Generally you have to specify the conda env full path.
Upvotes: 0
Reputation: 22818
I think you didn't quite understand how conda works.
In conda, you need to first create your own environment. In this case, let's call it my_env
.
conda create -n my_env python
Then, you can activate that environment with
conda activate my_env
Also, pay attention that the conda
precedes the activate, using activate
directly is obsolete.
Upvotes: 1