Python Forum
Python: command “python -m pip install --upgrade pip” doesn't work
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python: command “python -m pip install --upgrade pip” doesn't work
#1
hello dear experts, 


well i have no idea why the python things do not work here. 

the pc. Win 7

the idea: i want to install the newest python and some additional things. 




Python: command “python -m pip install --upgrade pip” doesn't work



I want to upgrade my pip, but if I type in "python -m pip install --upgrade pip", then my command shell says "cannot find 'python'". Python is already installed and my command shell can't detect the command "python", though.



Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\Kasper>pip install esptool
Collecting esptool
  Downloading https://files.pythonhosted.org/packages/6c/bf/578443af2270ebeff78f
dfd30cef3a02433cc63b34a912936653a48526dd/esptool-2.7.tar.gz (83kB)
    100% |████████████████████████████████| 92kB 1.7MB/s
Collecting pyserial>=3.0 (from esptool)
  Downloading https://files.pythonhosted.org/packages/0d/e4/2a744dd9e3be04a0c090
7414e2a01a7c88bb3915cbe3c8cc06e209f59c30/pyserial-3.4-py2.py3-none-any.whl (193k
B)/>
    100% |████████████████████████████████| 194kB 4.3MB/s
Collecting pyaes (from esptool)
  Downloading https://files.pythonhosted.org/packages/44/66/2c17bae31c9066137957
11fc78045c285048168919ace2220daa372c7d72/pyaes-1.6.1.tar.gz
Collecting ecdsa (from esptool)
  Downloading https://files.pythonhosted.org/packages/23/a8/8aa68e70959e1287da91
54e5164bb8bd5dd7025e41ae54e8d177b8d165c9/ecdsa-0.13.2-py2.py3-none-any.whl (59kB
)
    100% |████████████████████████████████| 61kB 7.7MB/s
Installing collected packages: pyserial, pyaes, ecdsa, esptool
Could not install packages due to an EnvironmentError: [WinError 5] Zugriff verw
eigert: 'c:\\program files\\python37\\Lib\\site-packages\\pyserial-3.4.dist-info
'
Consider using the `--user` option or check the permissions.

You are using pip version 10.0.1, however version 19.2.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.

C:\Users\Kasper>pip install wxPython
Collecting wxPython
  Downloading https://files.pythonhosted.org/packages/d0/8e/2c72bc3624e5cee50aa9
4f8ae8756bc1c3aec96e8d456b6aa1242e92e9e8/wxPython-4.0.6-cp37-cp37m-win_amd64.whl
 (22.9MB)
    100% |████████████████████████████████| 22.9MB 1.4MB/s
Collecting numpy (from wxPython)
  Downloading https://files.pythonhosted.org/packages/bd/51/7df1a3858ff0465f760b
482514f1292836f8be08d84aba411b48dda72fa9/numpy-1.17.2-cp37-cp37m-win_amd64.whl (
12.8MB)
    100% |████████████████████████████████| 12.8MB 2.5MB/s
Requirement already satisfied: six in c:\users\kasper\appdata\roaming\python\pyt
hon37\site-packages (from wxPython) (1.12.0)
Collecting pillow (from wxPython)
  Downloading https://files.pythonhosted.org/packages/ae/96/6f83deebfcd20a5d4ad3
5e4e989814a16559d8715741457e670aae1a5a09/Pillow-6.1.0-cp37-cp37m-win_amd64.whl (
2.0MB)
    100% |████████████████████████████████| 2.0MB 6.0MB/s
Installing collected packages: numpy, pillow, wxPython
Could not install packages due to an EnvironmentError: [WinError 5] Zugriff verw
eigert: 'c:\\program files\\python37\\Lib\\site-packages\\numpy'
Consider using the `--user` option or check the permissions.

You are using pip version 10.0.1, however version 19.2.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.

C:\Users\Kasper> -m pip install wxpython
Der Befehl "-m" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

C:\Users\Kasper> m pip install wxpython
Der Befehl "m" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

C:\Users\Kasper> pip3 install --upgrade pip
ERROR: To modify pip, please run the following command:
c:\program files\python37\python.exe -m pip install --upgrade pip
You are using pip version 10.0.1, however version 19.2.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.

C:\Users\Kasper>
well i have no glue whats going on here.
Wordpress - super toolkits a. http://wpgear.org/ :: und b. https://github.com/miziomon/awesome-wordpress :: Awesome WordPress: A curated list of amazingly awesome WordPress resources and awesome python things https://github.com/vinta/awesome-python
Reply
#2
it says in the last error message to run this command in which you never did
c:\program files\python37\python.exe -m pip install --upgrade pip
then run in the command console this to verify you have the new version
pip -V
or full path equivalent
c:\program files\python37\python.exe -m pip -V


(Sep-16-2019, 02:10 PM)apollo Wrote: I want to upgrade my pip, but if I type in "python -m pip install --upgrade pip", then my command shell says "cannot find 'python'"
When you installed python did you make sure the box was checked for setting python to the PATH? If not then python and pip will not be recognized unless you use the full path (As the upgrade command i shown agove).
Reply
#3
Did you read my answer in your lasted thread?
Quote:[WinError 5] check the permissions
Run cmd as administrator

Again look at Python 3.6/3.7 and pip installation under Windows,it should take short time to fix this.
Then it work like this from any folder,always.
# Upgrade
C:\code
λ python -m pip install --upgrade pip
Collecting pip
  Downloading ......
     |████████████████████████████████| 1.4MB 2.2MB/s
Installing collected packages: pip
  Found existing installation: pip 19.2.1
    Uninstalling pip-19.2.1:
      Successfully uninstalled pip-19.2.1
Successfully installed pip-19.2.3

# Test
C:\code
λ pip -V
pip 19.2.3 from c:\python37\lib\site-packages\pip (python 3.7)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  UART Serial Read & Write to MP3 Player Doesn't Work bill_z 15 586 Jul-17-2021, 04:19 PM
Last Post: bill_z
  Can't install python MurphysLaw 1 206 Jul-16-2021, 04:44 AM
Last Post: Larz60+
  string function doesn't work in script ClockPillow 3 305 Jul-13-2021, 02:47 PM
Last Post: deanhystad
  Unable to install Python branty1970 5 460 May-25-2021, 01:18 PM
Last Post: branty1970
  Can't install Python 2.6.9 with Pyenv Whyze 6 492 May-21-2021, 10:52 PM
Last Post: Whyze
  Run CMD Command In Python Script shantanu97 2 2,635 May-13-2021, 08:08 AM
Last Post: Gribouillis
  Newbie to Python (Attempting to install DJango on a VPS) jarjar95 0 319 May-04-2021, 03:51 PM
Last Post: jarjar95
Photo Windows 10 PowerShell doesn't work Amy 3 1,100 Apr-27-2021, 01:33 PM
Last Post: jefsummers
  Ping command using python 3.6.5 Martin2998 6 12,137 Apr-19-2021, 06:24 PM
Last Post: blazejwiecha
  Why doesn't this print statement work? stylingpat 10 1,035 Mar-23-2021, 07:54 PM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020