Skip to content

pip won't work oserror #6814

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
realsama opened this issue Jul 30, 2019 · 2 comments
Closed

pip won't work oserror #6814

realsama opened this issue Jul 30, 2019 · 2 comments
Labels
auto-locked Outdated issues that have been locked by automation type: support User Support

Comments

@realsama
Copy link

realsama commented Jul 30, 2019

windows 10

  • pip 19.2:
  • python 3.7:

All pip related activities won't work. getting OSError: [Errno 9] Bad file descriptor...

The error seems to come from an import.
from http.cookies import Morsel

Output

C:\Users\SAM>pip list
Traceback (most recent call last):
  File "c:\users\sam\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\sam\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\SAM\AppData\Local\Programs\Python\Python37\Scripts\pip.exe\__main__.py", line 5, in <module>
  File "c:\users\sam\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\__init__.py", line 40, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "c:\users\sam\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\cli\autocompletion.py", line 8, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "c:\users\sam\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\cli\main_parser.py", line 12, in <module>
    from pip._internal.commands import (
  File "c:\users\sam\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\commands\__init__.py", line 6, in <module>
    from pip._internal.commands.completion import CompletionCommand
  File "c:\users\sam\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\commands\completion.py", line 6, in <module>
    from pip._internal.cli.base_command import Command
  File "c:\users\sam\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\cli\base_command.py", line 18, in <module>
    from pip._internal.download import PipSession
  File "c:\users\sam\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\download.py", line 15, in <module>
    from pip._vendor import requests, six, urllib3
  File "c:\users\sam\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\requests\__init__.py", line 114, in <module>
    from . import utils
  File "c:\users\sam\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\requests\utils.py", line 26, in <module>
    from ._internal_utils import to_native_string
  File "c:\users\sam\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\requests\_internal_utils.py", line 11, in <module>
    from .compat import is_py2, builtin_str, str
  File "c:\users\sam\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\requests\compat.py", line 65, in <module>
    from http.cookies import Morsel
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 859, in get_code
  File "<frozen importlib._bootstrap_external>", line 917, in get_data
OSError: [Errno 9] Bad file descriptor
@ghost ghost added the S: needs triage Issues/PRs that need to be triaged label Jul 30, 2019
@chrahunt
Copy link
Member

Hello. A few questions:

  1. Do you get the same error if you run python -c "from http.cookies import Morsel"?
  2. Does this happen every time you run pip or the above command?

If so, and if you can get admin privileges on the computer in question, then you may be able to run procmon while running the command above and get details about what file it is failing to access.

@chrahunt chrahunt added S: awaiting response Waiting for a response/more information type: support User Support labels Jul 30, 2019
@ghost ghost removed the S: needs triage Issues/PRs that need to be triaged label Jul 30, 2019
@chrahunt
Copy link
Member

It's been some time, so I'll close this issue. Please reach out if you're still having any problems. Thanks!

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Sep 30, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 30, 2019
@pradyunsg pradyunsg removed the S: awaiting response Waiting for a response/more information label Mar 17, 2023
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 type: support User Support
Projects
None yet
Development

No branches or pull requests

3 participants