Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't upgrade pip
#1
Hi folks,

I'm having problems upgrading my pip.

This is the traceback I get:

Output:
PS C:\Users\Joshu\AppData\Roaming\Python\Python36\Scripts> python -m pip install --upgrade pip Collecting pip Using cached https://files.pythonhosted.org/packages/30/db/9e38760b32e3e7f40cce46dd5fb107b8c73840df38f0046d8e6514e675a1/pip-19.2.3-py2.py3-none-any.whl Installing collected packages: pip Found existing installation: pip 19.1.1 Uninstalling pip-19.1.1: Successfully uninstalled pip-19.1.1 Rolling back uninstall of pip Moving to c:\users\joshu\appdata\roaming\python\python36\scripts\pip.exe from C:\Users\Joshu\AppData\Local\Temp\pip-uninstall-2bzr45wg\pip.exe Moving to c:\users\joshu\appdata\roaming\python\python36\scripts\pip3.6.exe from C:\Users\Joshu\AppData\Local\Temp\pip-uninstall-2bzr45wg\pip3.6.exe Moving to c:\users\joshu\appdata\roaming\python\python36\scripts\pip3.exe from C:\Users\Joshu\AppData\Local\Temp\pip-uninstall-2bzr45wg\pip3.exe Moving to c:\users\joshu\appdata\roaming\python\python36\site-packages\pip-19.1.1.dist-info\ from c:\users\joshu\appdata\roaming\python\python36\site-packages\~ip-19.1.1.dist-info Moving to c:\users\joshu\appdata\roaming\python\python36\site-packages\pip\ from c:\users\joshu\appdata\roaming\python\python36\site-packages\~ip ERROR: Exception: Traceback (most recent call last): File "C:\Users\Joshu\AppData\Roaming\Python\Python36\site-packages\pip\_internal\cli\base_command.py", line 178, in main status = self.run(options, args) File "C:\Users\Joshu\AppData\Roaming\Python\Python36\site-packages\pip\_internal\commands\install.py", line 414, in run use_user_site=options.use_user_site, File "C:\Users\Joshu\AppData\Roaming\Python\Python36\site-packages\pip\_internal\req\__init__.py", line 58, in install_given_reqs **kwargs File "C:\Users\Joshu\AppData\Roaming\Python\Python36\site-packages\pip\_internal\req\req_install.py", line 920, in install use_user_site=use_user_site, pycompile=pycompile, File "C:\Users\Joshu\AppData\Roaming\Python\Python36\site-packages\pip\_internal\req\req_install.py", line 448, in move_wheel_files warn_script_location=warn_script_location, File "C:\Users\Joshu\AppData\Roaming\Python\Python36\site-packages\pip\_internal\wheel.py", line 544, in move_wheel_files generated.extend(maker.make(spec)) File "C:\Users\Joshu\AppData\Roaming\Python\Python36\site-packages\pip\_vendor\distlib\scripts.py", line 405, in make self._make_script(entry, filenames, options=options) File "C:\Users\Joshu\AppData\Roaming\Python\Python36\site-packages\pip\_vendor\distlib\scripts.py", line 309, in _make_script self._write_script(scriptnames, shebang, script, filenames, ext) File "C:\Users\Joshu\AppData\Roaming\Python\Python36\site-packages\pip\_vendor\distlib\scripts.py", line 245, in _write_script launcher = self._get_launcher('t') File "C:\Users\Joshu\AppData\Roaming\Python\Python36\site-packages\pip\_vendor\distlib\scripts.py", line 384, in _get_launcher result = finder(distlib_package).find(name).bytes AttributeError: 'NoneType' object has no attribute 'bytes' WARNING: You are using pip version 19.1.1, however version 19.2.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I have python on my Path (I actually have two versions on there-I think one came installed with Visual Studio but it hasn't been a problem yet):

Output:
PS C:\WINDOWS\system32> $Env:Path C:\Program Files (x86)\PHP\v7.3;C:\Program Files\Haskell\bin;C:\Program Files\Haskell Platform\8.6.3\lib\extralibs\bin;C:\Program Files\Haskell Platform\8.6.3\bin;C:\Program Files\Microsoft MPI\Bin\;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Java\jdk1.8.0_131\bin;C:\Program Files (x86)\Calibre2\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\MinGW\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\Joshu\AppData\Roaming\Python\Python36\Scripts;C:\Program Files (x86)\Microsoft_Visual_Studio\Shared\Python36_64;C:\Program Files\Git\bin;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\Joshu\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Joshu\AppData\Local\Microsoft\WindowsApps
Any ideas? Also is there a way of automatically setting pip to upgrade or is this a bad idea?

Thanks,

Josh
Reply
#2
Just my first thought; did you start your command window with admin rights?
Reply
#3
There are problem with your Environment variable Path.
You only have Path to pip.exe which in Scripts folder,and root Python is Python Visual studio version(mix up).
C:\Users\Joshu\AppData\Roaming\Python\Python36\Scripts
For it to not use the Python Visual studio version,most also have path to root Python36(Roaming).
This is what Path should be if you want to use this version.
C:\Users\Joshu\AppData\Roaming\Python\Python36
C:\Users\Joshu\AppData\Roaming\Python\Python36\Scripts

Remove from Path Python Visual studio install.
C:\Program Files (x86)\Microsoft_Visual_Studio\Shared\Python36_64
Could also upgrade to 3.7 if follow this Python 3.6/3.7 and pip installation under Windows
There also info about modify Environment variable Path and usage py and more.
Reply
#4
Yeh I'm using powershell with admin rights...

I think this path C:\Users\Joshu\AppData\Roaming\Python\Python36\Scripts actually just points to where the current version of pip is held.

There is no python.exe in C:\Users\Joshu\AppData\Roaming\Python\Python36 so I think I need the Visual Studio version

Still having the same error though

Ok so I 'solved' the issue by installing latest version of python and then upgrading pip
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Version upgrade nitinkukreja 1 912 Feb-04-2023, 10:27 PM
Last Post: Larz60+
  Upgrade makes Code Error kucingkembar 6 3,112 Jul-28-2022, 06:44 PM
Last Post: kucingkembar
  pip doesn't work after Python upgrade Pavel_47 10 4,237 May-30-2022, 03:31 PM
Last Post: bowlofred
  Upgrade from 3.7.9 to 3.7.11 quazirfan 4 5,490 Sep-08-2021, 01:02 AM
Last Post: quazirfan
  Upgrade pip error karunas 3 3,156 Nov-26-2020, 11:40 AM
Last Post: buran
  Upgrade Python Version ? JohnnyCoffee 2 2,540 Aug-08-2020, 09:56 PM
Last Post: Larz60+
  pip upgrade error most197 4 5,315 May-08-2020, 05:35 PM
Last Post: snippsat
  Need to upgrade 3.4.8 to 3.7.2 dipankargp 3 3,232 Mar-06-2019, 01:17 PM
Last Post: snippsat
  Upgrade Setuptools on Python 3.4 Alexver 2 7,938 Sep-20-2018, 06:22 AM
Last Post: Alexver
  fail to upgrade pygobject jiapei100 0 3,082 Aug-16-2018, 10:32 AM
Last Post: jiapei100

Forum Jump:

User Panel Messages

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