Lech Migdal
Lech Migdal

Reputation: 3978

Installation of TensorFlow on windows 7 - 'pip3' is not recognized as an internal or external command,

When following the Installing TensorFlow for Windows guide https://www.tensorflow.org/install/install_windows, after executing

C:\> pip3 install --upgrade tensorflow

I get the following error:

'pip3' is not recognized as an internal or external command,

It looks like pip3 isn't recognized at all (although PATH to python is set)

Upvotes: 23

Views: 36927

Answers (8)

Sid Ray
Sid Ray

Reputation: 81

The issue is your path in the cmd is not that of where your python scripts are placed. In this case you can either navigate to "AppData\Local\Programs\Python\Python36\Scripts" in your terminal and then run the command or you can simply put C:\Users\Your User Name\AppData\Local\Programs\Python\Python36\Scripts to Path variable.

Then re-launch your cmd and type "pip3 install tensorflow" and see the feel the happiness :)

Upvotes: 0

Divakar Rajesh
Divakar Rajesh

Reputation: 1210

That is because you haven't setup the environment variable yet.

Follow the steps by @rajesh

I had the same problem and i found his answer helpful

  1. Right click on This PC > Select Properties
  2. Select Advanced system settings on the left
  3. In the dialog box select Environment Variables
  4. In the system variables section select path and cllck on edit
  5. Select new and enter the path where the python scripts are..

it is mostly in C:\Users[your user name]\AppData\Local\Programs\Python\Python36\Scripts

  1. Then ok.. to all the boxes opened
  2. Close cmd if it is already open and now try installing tensorflow using pip again like this
 pip3 install --upgrade tensorflow

Upvotes: 6

nikodean2
nikodean2

Reputation: 81

Typing the python command before that should do the trick. In my case (on Windows 8.1 with Python 3.6), I had to type 'py' instead of 'python' as follows:

py -m pip install --upgrade tensorflow

The answer depends on the system you're using.

Upvotes: 0

VoteIt.Top
VoteIt.Top

Reputation: 1

I just experienced the same issue, most likely you downloaded a zipped version of python, then unzipped it, and added it to $PATH just like me, python can work but pip3 cannot, and python -m pip cannot either. fix solution is to download a executable version of python, then follow common installation steps, pip3 is selected by default, then everything is OK now.

Upvotes: -1

Joseph Sun
Joseph Sun

Reputation: 1

when installing python, on the install window, check the box "Active path"(something like that), which builds up a path link. So you can run "pip3 install" at anywhere.

Upvotes: 0

rajesh-nitc
rajesh-nitc

Reputation: 5539

This will work, if you are facing pip3 or pip is not recognized as an internal or external command issue on windows:

  1. From the desktop, right click the Computer icon.
  2. Choose Properties from the context menu.
  3. Click the Advanced system settings link.
  4. Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit.
  5. A new pop up will open. Variable name will remain Path. We will change the Variable value to the location of the folder where your python scripts folder is located. Find it.

For e.g. I changed its value to C:\Users\rgupta6\AppData\Local\Programs\Python\Python35\Scripts

  1. Close all remaining windows. Reopen Command prompt window, and run your pip3 install --upgrade tensorflow command or pip3 install tensorflow command

Upvotes: 18

Lanka
Lanka

Reputation: 357

Before running pip3 install --upgrade tensorflow you need check if you are using the correct Python 3.5 installation:

Python 3.5.2  [MSC v.1900 64 bit (AMD64)] on win32

Notice the 64 bit part.
Otherwise, it gives the above error.
You are going to install tensorflow-1.0.1-cp35-cp35m-win_amd64.whl, therefore double check your correct version (mostly this is happening you have both Python 2.7 and 3.5).

Upvotes: 2

Lech Migdal
Lech Migdal

Reputation: 3978

Run the following

python -m pip install --upgrade tensorflow

Assuming python is working, TensorFlow should get installed (at least the "Validate the installation" step is green).

Upvotes: 30

Related Questions