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

前端 未结 8 1612
挽巷
挽巷 2020-12-09 16:35

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

C:\\> pip3 install --upgrad         


        
相关标签:
8条回答
  • 2020-12-09 16:42

    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.

    0 讨论(0)
  • 2020-12-09 16:47

    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.

    0 讨论(0)
  • 2020-12-09 16:59

    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
    
    0 讨论(0)
  • 2020-12-09 17:00

    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 :)

    0 讨论(0)
  • 2020-12-09 17:02

    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.

    0 讨论(0)
  • 2020-12-09 17:03

    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
    0 讨论(0)
提交回复
热议问题