Skip to content

Non-importerror upgrading issue #8011

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

Closed
RDIL opened this issue Apr 10, 2020 · 6 comments
Closed

Non-importerror upgrading issue #8011

RDIL opened this issue Apr 10, 2020 · 6 comments

Comments

@RDIL
Copy link
Contributor

RDIL commented Apr 10, 2020

Environment

  • pip version: 19.3
  • Python version: 381
  • OS: Windows 10

This happened while trying to upgrade pip with python -m pip install --upgrade pip (in an admin shell)

Stack:

ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\gibdu\AppData\Roaming\Python\Python38\site-packages\pip\_internal\cli\base_command.py", line 153, in _main
    status = self.run(options, args)
  File "C:\Users\gibdu\AppData\Roaming\Python\Python38\site-packages\pip\_internal\commands\install.py", line 446, in run
    installed = install_given_reqs(
  File "C:\Users\gibdu\AppData\Roaming\Python\Python38\site-packages\pip\_internal\req\__init__.py", line 58, in install_given_reqs
    requirement.install(
  File "C:\Users\gibdu\AppData\Roaming\Python\Python38\site-packages\pip\_internal\req\req_install.py", line 858, in install
    self.move_wheel_files(
  File "C:\Users\gibdu\AppData\Roaming\Python\Python38\site-packages\pip\_internal\req\req_install.py", line 487, in move_wheel_files
    wheel.move_wheel_files(
  File "C:\Users\gibdu\AppData\Roaming\Python\Python38\site-packages\pip\_internal\wheel.py", line 594, in move_wheel_files
    generated_console_scripts = maker.make_multiple(scripts_to_generate)
  File "C:\Users\gibdu\AppData\Roaming\Python\Python38\site-packages\pip\_vendor\distlib\scripts.py", line 402, in make_multiple
    filenames.extend(self.make(specification, options))
  File "C:\Users\gibdu\AppData\Roaming\Python\Python38\site-packages\pip\_internal\wheel.py", line 330, in make
    return super(PipScriptMaker, self).make(specification, options)
  File "C:\Users\gibdu\AppData\Roaming\Python\Python38\site-packages\pip\_vendor\distlib\scripts.py", line 391, in make
    self._make_script(entry, filenames, options=options)
  File "C:\Users\gibdu\AppData\Roaming\Python\Python38\site-packages\pip\_vendor\distlib\scripts.py", line 295, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "C:\Users\gibdu\AppData\Roaming\Python\Python38\site-packages\pip\_vendor\distlib\scripts.py", line 231, in _write_script
    launcher = self._get_launcher('t')
  File "C:\Users\gibdu\AppData\Roaming\Python\Python38\site-packages\pip\_vendor\distlib\scripts.py", line 370, in _get_launcher
    result = finder(distlib_package).find(name).bytes
AttributeError: 'NoneType' object has no attribute 'bytes'
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
@ghost ghost added the S: needs triage Issues/PRs that need to be triaged label Apr 10, 2020
@uranusjr
Copy link
Member

I am confused. Why did you specifically mention the error is not an ImportError? Is there a reason you think is significant?

@RDIL
Copy link
Contributor Author

RDIL commented Apr 10, 2020

Well I know a lot of the windows upgrading problems have to do with importerrors so I thought I would just clarify.

@uranusjr
Copy link
Member

I see, thanks for the information! Would you mind trying to upgrade pip to 20.0 and see whether the issue persists? This looks similar to #6546, which should be resolved in more recent versions.

@RDIL
Copy link
Contributor Author

RDIL commented Apr 10, 2020

Well so I am trying to upgrade my pip from 19.3 to 20 but this is the error I'm getting!

@uranusjr
Copy link
Member

Try downloading the .whl directly from PyPI, and run python /path/to/downloaded.whl/pip install --upgrade pip instead. I’m not completely sure whether that would work, but worth a try.

@pfmoore
Copy link
Member

pfmoore commented Apr 10, 2020

... or download https://bootstrap.pypa.io/get-pip.py and run python get-pip.py --upgrade (which does basically the same thing, but is the documented approach 🙂)

@RDIL RDIL closed this as completed May 8, 2020
@pradyunsg pradyunsg removed the S: needs triage Issues/PRs that need to be triaged label Feb 12, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants