14

So I have followed a couple of posts here such as this.

So I have installed python 3.6 with Anaconda. Then I went into the PATH and I inserted the path to Python.

So now when I type into the cmd "python" I get the response

Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

However if I type in "python3" I get the usual problem

'python3' is not recognized as an internal or external command,
operable program or batch file.

Why is that?

1
  • 1
    No need, you already are running python3, batteries included! Commented Jan 20, 2018 at 14:02

2 Answers 2

15

Your question may have already been answered; see this answer to: Python 3 installation on windows running from command line. Specifically:

OSX and Linux have python executable installed by default as a rule and it refers to Python 2 version in most cases at the moment that is why you need a separate python3 name there.

There is no Python on Windows by default. And therefore any version that you've installed is just python (I guess). The recommended way to manage multiple python versions is to use the Python launcher.

TL;DR: python3 is not a valid command on Windows, regardless of the distribution that it comes with (Anaconda in your case).

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you a lot! So if I wanted to create a virtual environment, should I just use python -m venv venv instead of python3 -m venv venv? To get this command, I am referring to this tutorial that I found online: blog.miguelgrinberg.com/post/…
@Euler_Salter Glad to be of help! You are correct, of course. On Windows, python -m venv venv will create a venv with the name venv in your current directory, provided that you have Python 3.3 or later installed.
1

Euler_Salter.

If you have installed Anaconda, I have a tip for you.

Before giving you a tip, there is background tip for you.

Python has a lot of modules and their dependency. So It provides virtual environment to isolate from dependency issues.

Anaconda also provides it.

So, You can easily find "Anaconda Prompt" in you windows system.

Here is the Short Cut Win Key -> Type "Anaconda Prompt" on Search Input

Or

You can execute it using command.

%windir%\System32\cmd.exe "/K" %UserProfile%\Anaconda3\Scripts\activate.bat 
%UserProfile%\Anaconda3

And I think that you're confused of the difference between linux and windows.

As I know, If you install python3 on Ubuntu, there is python3 binary path, or symlink for it. That is, whether or not there is python3 is not important thing.

You can just make a symlink for it.

See it. https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/

I sincerely hope that this will help you.

1 Comment

Thank you! Yeah I am using Windows, but know little or nothing about Linux to be honest. So should I make a virtual environment with anaconda then?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.