Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 3.7 - PIP upgrade error on windows 10

I tried to update PIP (Windows 10, Python 3.7.1) in console using command:

python37 -m pip install --upgrade pip

This is an error I got everytime I try to update it:

>Exception:
Traceback (most recent call last):
  File "C:\Users\5gyblo\AppData\Roaming\Python\Python37\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "C:\Users\5gyblo\AppData\Roaming\Python\Python37\site-packages\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "C:\Users\5gyblo\AppData\Roaming\Python\Python37\site-packages\pip\req\req_set.py", line 784, in install
    **kwargs
  File "C:\Users\5gyblo\AppData\Roaming\Python\Python37\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\5gyblo\AppData\Roaming\Python\Python37\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "C:\Users\5gyblo\AppData\Roaming\Python\Python37\site-packages\pip\wheel.py", line 462, in move_wheel_files
    generated.extend(maker.make(spec))
  File "C:\Users\5gyblo\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 372, in make
    self._make_script(entry, filenames, options=options)
  File "C:\Users\5gyblo\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 276, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "C:\Users\5gyblo\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 212, in _write_script
    launcher = self._get_launcher('t')
  File "C:\Users\5gyblo\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 351, in _get_launcher
    result = finder(distlib_package).find(name).bytes
AttributeError: 'NoneType' object has no attribute 'bytes'

Surprising fact - I had succesfully updated PIP on Python 2.7 isntance without any problems.

like image 436
Maciek Avatar asked Apr 15 '26 10:04

Maciek


1 Answers

I faced this error while trying to upgrade from pip version 18.1 to 19.0.3. After a lot of search I hit the solution at https://packaging.python.org/tutorials/installing-packages/ (If that still doesn’t allow you to run pip:

Securely Download get-pip.py [1]

Run python get-pip.py. [2] This will install or upgrade pip. Additionally, it will install setuptools and wheel if they’re not installed already.)

The link there takes you to:

Use https://bootstrap.pypa.io/get-pip.py

Download and save the file, run it from command prompt. It worked like a charm for me.

like image 186
Rajeev Dubey Avatar answered Apr 16 '26 23:04

Rajeev Dubey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!