When following the Installing TensorFlow for Windows guide https://www.tensorflow.org/install/install_windows, after executing
C:\\> pip3 install --upgrad
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.
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.
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
- Right click on This PC > Select Properties
- Select Advanced system settings on the left
- In the dialog box select Environment Variables
- In the system variables section select path and cllck on edit
- 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
- Then ok.. to all the boxes opened
- Close cmd if it is already open and now try installing tensorflow using pip again like this
pip3 install --upgrade tensorflow
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 :)
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.
This will work, if you are facing pip3 or pip is not recognized as an internal or external command issue on windows:
For e.g. I changed its value to
C:\Users\rgupta6\AppData\Local\Programs\Python\Python35\Scripts
pip3 install --upgrade tensorflow
command or pip3 install tensorflow
command