pip: pip 6.0.8 AttributeError when upgrading to 6.1.1 in virtualenv

Windows 7, Python 3.4.3, updated pip in base. Created virtualenv, saw that it was still on pip 6.0.8

Activated venv, ran python -m pip install pip -U

log:

Installing collected packages: pip
  Found existing installation: pip 6.0.8
    Uninstalling pip-6.0.8:
      Successfully uninstalled pip-6.0.8

  Rolling back uninstall of pip
...
     result = finder(distlib_package).find(name).bytes
 AttributeError: 'NoneType' object has no attribute 'bytes'

However, next time I run pip -V, it reports pip 6.1.1, so what is the effect of the error?

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 2
  • Comments: 37 (6 by maintainers)

Most upvoted comments

Same sh** with pip 7.1.0 with Python 2.7 on Window 7 64bit - see below.

BUT HAPPILY easy_install -U pip did it for me and upgraded to 7.1.2 😃

H:\>pip install -U pip
You are using pip version 7.1.0, however version 7.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Collecting pip
  Using cached pip-7.1.2-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 7.1.0
    Uninstalling pip-7.1.0:
      Successfully uninstalled pip-7.1.0
  Rolling back uninstall of pip
Exception:
Traceback (most recent call last):
  File "c:\python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\basecommand.py", line 223, in main
    status = self.run(options, args)
  File "c:\python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\commands\install.py", line 299, in run
    root=options.root_path,
  File "c:\python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\req\req_set.py", line 646, in install
    **kwargs
  File "c:\python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\req\req_install.py", line 813, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "c:\python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\req\req_install.py", line 1008, in move_wheel_files
    isolated=self.isolated,
  File "c:\python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\wheel.py", line 449, in move_wheel_files
    generated.extend(maker.make(spec))
  File "c:\python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\_vendor\distlib\scripts.py", line 323, in make
    self._make_script(entry, filenames, options=options)
  File "c:\python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\_vendor\distlib\scripts.py", line 227, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "c:\python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\_vendor\distlib\scripts.py", line 163, in _write_script
    launcher = self._get_launcher('t')
  File "c:\python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\_vendor\distlib\scripts.py", line 302, in _get_launcher
    result = finder(distlib_package).find(name).bytes
AttributeError: 'NoneType' object has no attribute 'bytes'

easy_install -U pip worked for me . Thanks 👍

sorry, --force-reinstall

I’m seeing this same problem trying to upgrade pip within a virtualenv that was created with pip 9.0.1 by PyCharm.

please note that easy_install -U pip has some dire consequences as it does an egg based install instead of a sane install

Yep, same. Windows 10. Python 2.7.10.

easy_install -U pip

The above command worked.

easy_install -U pip worked for me too . Thanks for all

I also faced this issue, when using Intellij IDEA to set up the virtualenv. Python: 3.6.3 Pip: 9.0.1 Intellij: 2018.1 (Ultimate Edition) 181.4203.550 Windows 7: 6.1

Running easy_install -U pip seemed to work for me. Not sure if @RonnyPfannschmidt’s warning is relevant as I don’t know what an “egg based install” is. It installed pip 10.0.0b2 and seems to be working fine.

I was run ‘python -m pip install -U --force-reinstall pip’ , python 3.6 Collecting pip Using cached pip-9.0.1-py2.py3-none-any.whl Installing collected packages: pip Found existing installation: pip 8.1.2 Uninstalling pip-8.1.2: Successfully uninstalled pip-8.1.2 Rolling back uninstall of pip Exception: Traceback (most recent call last): File “C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pip\basecommand.py”, line 215, in main status = self.run(options, args) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pip\commands\install.py”, line 317, in run prefix=options.prefix_path, File “C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pip\req\req_set.py”, line 742, in install **kwargs File “C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pip\req\req_install.py”, line 831, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pip\req\req_install.py”, line 1032, in move_wheel_files isolated=self.isolated, File “C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pip\wheel.py”, line 463, in move_wheel_files generated.extend(maker.make(spec)) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pip_vendor\distlib\scripts.py”, line 372, in make self._make_script(entry, filenames, options=options) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pip_vendor\distlib\scripts.py”, line 276, in _make_script self._write_script(scriptnames, shebang, script, filenames, ext) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pip_vendor\distlib\scripts.py”, line 212, in _write_script launcher = self._get_launcher(‘t’) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pip_vendor\distlib\scripts.py”, line 351, in _get_launcher result = finder(distlib_package).find(name).bytes File “C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pip_vendor\distlib\resources.py”, line 324, in finder raise DistlibException(‘Unable to locate finder for %r’ % package) pip._vendor.distlib.DistlibException: Unable to locate finder for ‘pip._vendor.distlib’ You are using pip version 8.1.2, however version 9.0.1 is available. You should consider upgrading via the ‘python -m pip install --upgrade pip’ command.

Same here, using easy_install helped.

Win 10 and Python 3.4.4, same error, the pip force reinstall thing didn’t work but the easy_install -U pip did.