Search code examples
pythonpipanacondavirtualenvconda

Windows: Anaconda 'python' is not recognized as an internal or external command on CMD (Updated)


This is starting to get aggravating. I'm getting the typical 'python' is not recognized as an internal or external command... message when trying to run python on the command line. This is a common issue, and I've found plenty of posts saying to fix it by adding python folder (C:\Users\ftake\Anaconda3) my Windows path (restarted my PC after that) but nothing worked for me. The problem is that I've already Anaconda 1.8.2 installed on my computer and when trying to run python on CMD an error message occurs saying that python is not recognized as an internal...

I've tried to install pyinstaller (or any other Python packages) using pip, a message occurs too 'pip' is not recognized as an internal or external command... Even though when trying to run (on CMD) the following command to create a virtual environment: virtualenv --python=python3.6.3 <env-name>

I'm using: OS: Windows 10 Pro. Anaconda Version: 1.8.2


Solution

  • You probably haven't added it to your environment variables, here how you do it:

    1. Go to "Edit the system environment variables" inside of control panel (you can search for it to using the search thing).

    2. Once you are there make sure you are in the advanced section.

    3. Click "Environment variables". In the section that says "System variables" search for something named "Path".

    4. If path is not there, simply create it by clicking "New" in the part that says system variables.

    5. Once you got that done, select "Path" and click edit, now find the path that you installed Anaconda in (i.e C:\Users\ftake\Anaconda3) and add it to the "Path".

    6. Once you got that done try using the python command again and it should work.

    If I was unclear about something, you can follow this as well: https://www.java.com/en/download/help/path.xml

    I know it's for java but it works the exact same way for python.

    EDIT: Also for pip it's literally the same thing just add \Scripts to the end of the path