Mrs. Bean
Mrs. Bean

Reputation: 172

Pip version virtualenv doesn't match and won't upgrade

Okay, so, I run my project packages in a virtual environment. I usually manage these packages through PyCharm. PyCharm tells me I have Pip 9.0.1 installed. Only when I run my virtual environment from the command line and I print pip version, it says 7.1.0. If I try upgrading using pip install --upgrade pip I get an error

Collecting pip
  Using cached pip-9.0.1-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:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\basecommand.py", line 223, in main
    status = self.run(options, args)
  File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\commands\install.py", line 299, in run
    root=options.root_path,
  File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\req\req_set.py", line 646, in install
    **kwargs
  File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\req\req_install.py", line 813, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\req\req_install.py", line 1008, in move_wheel_files
    isolated=self.isolated,
  File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\wheel.py", line 449, in move_wheel_files
    generated.extend(maker.make(spec))
  File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\_vendor\distlib\scripts.py", line 323, in make
    self._make_script(entry, filenames, options=options)
  File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\_vendor\distlib\scripts.py", line 227, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.egg\pip\_vendor\distlib\scripts.py", line 163, in _write_script
    launcher = self._get_launcher('t')
  File "c:\python-virtualenv\arcus\lib\site-packages\pip-7.1.0-py3.5.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'

My system-wide pip version is 9.0.1 though. I just don't get what is happening. Hopefully someone can shed some light. I've tried de-installing and re-installing it again, I've tried using a wheel to install, doesn't work

Windows, by the way.

Upvotes: 4

Views: 2288

Answers (2)

Arnold
Arnold

Reputation: 21

Open the Command Prompt (cmd) as administrator and run:

pip install --user --upgrade pip

Or try:

python -m pip install --user --upgrade pip

Relevant GitHub issue.

Upvotes: 2

Silas Serner
Silas Serner

Reputation: 26

I had the same issue, but found the answer here: https://github.com/pypa/pip/issues/2669

Basicly I just had to use this command instead: easy_install -U pip

Upvotes: 1

Related Questions