pip: Error to upgrade pip from 9.0.3 to 10

  • Pip version: 9.0.3
  • Python version: 3.6.4
  • Operating system: Windows 7

When I want to update pip with the command python -m pip install --upgrade pip aborts and I get the following error:

C:\Users\Cristian>python -m pip install -U pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390
b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 9.0.3
    Uninstalling pip-9.0.3:
      Successfully uninstalled pip-9.0.3
  Rolling back uninstall of pip
Exception:
Traceback (most recent call last):
  File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\base
command.py", line 215, in main
    status = self.run(options, args)
  File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\comm
ands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\req\
req_set.py", line 784, in install
    **kwargs
  File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\req\
req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\req\
req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\whee
l.py", line 462, in move_wheel_files
    generated.extend(maker.make(spec))
  File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\_ven
dor\distlib\scripts.py", line 372, in make
    self._make_script(entry, filenames, options=options)
  File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\_ven
dor\distlib\scripts.py", line 276, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\_ven
dor\distlib\scripts.py", line 212, in _write_script
    launcher = self._get_launcher('t')
  File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\_ven
dor\distlib\scripts.py", line 351, in _get_launcher
    result = finder(distlib_package).find(name).bytes
AttributeError: 'NoneType' object has no attribute 'bytes'
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 8
  • Comments: 20 (7 by maintainers)

Most upvoted comments

I followed this link Error while upgrading to pip 7.1.10 on Windows 8.1 (python 2.7)

easy_install -U pip

Solved broken dependencies and it worked for me

You should consider upgrading via the ‘pip install --upgrade pip’ command.

I had this issue as well… it seems various combinations of PATH and environment mangling can do this. Strangely I was able to upgrade this way:

python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip

which upgraded my system pip from 9.x to 10.0.1. i’d love to be able to explain why that worked but ¯_(ツ)_/¯

I also experienced the same issue. The below later worked for me: #Windows 10: pip upgrade from 9.0.1 to 10.0.1 (base) C:\XXXXXXXX>conda update pip (base) C:\XXXXXXXX>conda update -n base conda (base) C:\XXXXXXXX>conda create -n my_root --clone=“C:\ProgramData\Anaconda3” (base) C:\XXXXXXXX>conda activate my_root

#Tensorflow installation (my_root) C:\XXXXXXXX> (my_root) C:\XXXXXXXX>pip install tensorflow (my_root) C:\XXXXXXXX>python -m pip install --upgrade pip

Just performed “python -m pip uninstall pip” first, then “python -m pip install -U pip”

So I have… C:\GITHUB\stress_testing\venv\Scripts\python.exe: No module named pip