Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error upgrading from 19.0.3 to 19.1.1 on Win 10 #6546

Closed
estomagordo opened this issue May 27, 2019 · 4 comments
Closed

Error upgrading from 19.0.3 to 19.1.1 on Win 10 #6546

estomagordo opened this issue May 27, 2019 · 4 comments
Labels
auto-locked Outdated issues that have been locked by automation project: vendored dependency Related to a vendored dependency

Comments

@estomagordo
Copy link

Environment

  • pip version: 19.0.3 -> 19.1.1
  • Python version: 3.7.2
  • OS: Windows 10 Enterprise 64 bit

Description
I have tried upgrading pip through at least two different approaches, but get the same result. The commands I've tried are:

python -m pip install --upgrade pip

and

python -m pip install -U --force-reinstall pip

Expected behavior
Pip upgrades

Output

Collecting pip
  Using cached https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 19.0.3
    Uninstalling pip-19.0.3:
      Successfully uninstalled pip-19.0.3
  Rolling back uninstall of pip
  Moving to c:\users\se-chrohls-01\appdata\roaming\python\python37\scripts\
   from c:\users\se-chrohls-01\appdata\roaming\python\python37\~cripts
  Moving to c:\users\se-chrohls-01\appdata\roaming\python\python37\site-packages\pip-19.0.3.dist-info\
   from c:\users\se-chrohls-01\appdata\roaming\python\python37\site-packages\~ip-19.0.3.dist-info
  Moving to c:\users\se-chrohls-01\appdata\roaming\python\python37\site-packages\pip\
   from c:\users\se-chrohls-01\appdata\roaming\python\python37\site-packages\~ip
Exception:
Traceback (most recent call last):
  File "C:\Users\se-chrohls-01\AppData\Roaming\Python\Python37\site-packages\pip\_internal\cli\base_command.py", line 179, in main
    status = self.run(options, args)
  File "C:\Users\se-chrohls-01\AppData\Roaming\Python\Python37\site-packages\pip\_internal\commands\install.py", line 393, in run
    use_user_site=options.use_user_site,
  File "C:\Users\se-chrohls-01\AppData\Roaming\Python\Python37\site-packages\pip\_internal\req\__init__.py", line 57, in install_given_reqs
    **kwargs
  File "C:\Users\se-chrohls-01\AppData\Roaming\Python\Python37\site-packages\pip\_internal\req\req_install.py", line 913, in install
    use_user_site=use_user_site, pycompile=pycompile,
  File "C:\Users\se-chrohls-01\AppData\Roaming\Python\Python37\site-packages\pip\_internal\req\req_install.py", line 445, in move_wheel_files
    warn_script_location=warn_script_location,
  File "C:\Users\se-chrohls-01\AppData\Roaming\Python\Python37\site-packages\pip\_internal\wheel.py", line 544, in move_wheel_files
    generated.extend(maker.make(spec))
  File "C:\Users\se-chrohls-01\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 405, in make
    self._make_script(entry, filenames, options=options)
  File "C:\Users\se-chrohls-01\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 309, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "C:\Users\se-chrohls-01\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 245, in _write_script
    launcher = self._get_launcher('t')
  File "C:\Users\se-chrohls-01\AppData\Roaming\Python\Python37\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'```
@cjerdonek
Copy link
Member

cjerdonek commented May 27, 2019

This looks similar to: #2669 (6.0.8 to 6.1.1), #5343 (9.0.3 to 10), #5820 (10.0.1 to 18.0).

@cjerdonek
Copy link
Member

I just filed an issue on distlib's tracker to see if distlib can be doing something on their end to improve the error that callers see (to make it easier to troubleshoot, etc): https://bitbucket.org/pypa/distlib/issues/123/attributeerror-nonetype-object-has-no

@cjerdonek
Copy link
Member

Some good news is that distlib's author (Vinay Sajip) just pushed a change to distlib in response to the above issue I filed (in one day, wow!) that improves the exception in this case. The new exception will look something like this--

ValueError(
    'Unable to find resource %s in package %s' % (name, distlib_package)
)

So once distlib releases a new version and pip updates its vendored distlib to that version, there will be more information for people to go on the next time this happens..

@uranusjr
Copy link
Member

Distlib has released 0.3.0 in October 2019. pip started vendoring it since 20.0. Closing since the issue would not be present in the latest pip version. Please report a separate issue if you see a similar exception in pip 20.0 or later.

@uranusjr uranusjr added project: vendored dependency Related to a vendored dependency and removed S: needs triage Issues/PRs that need to be triaged labels Apr 10, 2020
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 20, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation project: vendored dependency Related to a vendored dependency
Projects
None yet
Development

No branches or pull requests

4 participants