Getting "SyntaxError: invalid syntax"

Question:

I’m new to Python, and keep getting a "syntax error". With Windows 7, I start in command prompt, and enter the python terminal. I receive the warning

Warning: This Python interpreter is in a conda environment, but the environment has not been activated. Libraries may fail to load. To activate this environment please see https://conda.io/activation.

Following the instructions there, I enter:

conda activate myenv  

(with myenv replaced with the folder containing the path to python.exe) It seems I always get

SyntaxError: invalid syntax
Asked By: MrGlazedDonuts

||

Answers:

You should enter conda activate myenv before starting python, if I understand it correctly

Answered By: LeoE
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.