Skip to content
Advertisement

Error creating anaconda python environment

Every time I try to create a new environment with anaconda in the Windows Command Prompt I get this error:

File "<stdin>", line 1
  conda create -n 11 python=3.6
             ^

SyntaxError: invalid syntax

I use this command to create the environment:

conda create -n 11 python=3.6

Screenshot of error in command prompt

Advertisement

Answer

You are supposed to use a terminal not the Python interpreter to execute those commands.

Search for terminal in search menu of you computer (cmd on Windows, terminal on Linux) and open that then try those commands and it should work.

Just make sure that it is not the Python interpreter (it will not have >>>) or a Python script.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement