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

urllib3 module not found when trying to install ntia-conformance-checker #49

Closed
rnjudge opened this issue Jan 24, 2023 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@rnjudge
Copy link

rnjudge commented Jan 24, 2023

I am trying to install the conformance checker tool according to the directions in the README but hit the following ModuleNotFound error:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/packages/__init__.py", line 27, in <module>
    from . import urllib3
  File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/packages/urllib3/__init__.py", line 8, in <module>
    from .connectionpool import (
  File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/packages/urllib3/connectionpool.py", line 35, in <module>
    from .connection import (
  File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/packages/urllib3/connection.py", line 54, in <module>
    from ._collections import HTTPHeaderDict
  File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/packages/urllib3/_collections.py", line 2, in <module>
    from collections import Mapping, MutableMapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/pipenv", line 33, in <module>
    sys.exit(load_entry_point('pipenv==11.9.0', 'console_scripts', 'pipenv')())
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pipenv/cli.py", line 347, in install
    from .import core
  File "/usr/lib/python3/dist-packages/pipenv/core.py", line 21, in <module>
    import requests
  File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/__init__.py", line 62, in <module>
    from .packages.urllib3.exceptions import DependencyWarning
  File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/packages/__init__.py", line 29, in <module>
    import urllib3
ModuleNotFoundError: No module named 'urllib3'

urllib3 was already installed so I tried to upgrade it but still get the same error

(ternenv) rose@rose-vm:~/ternenv/ntia-conformance-checker$ pip install urllib3 --upgrade
Requirement already satisfied: urllib3 in /home/rose/ternenv/lib/python3.10/site-packages (1.26.9)
Collecting urllib3
  Downloading urllib3-1.26.14-py2.py3-none-any.whl (140 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.6/140.6 kB 2.4 MB/s eta 0:00:00
Installing collected packages: urllib3
  Attempting uninstall: urllib3
    Found existing installation: urllib3 1.26.9
    Uninstalling urllib3-1.26.9:
      Successfully uninstalled urllib3-1.26.9
Successfully installed urllib3-1.26.14

@jspeed-meyers
Copy link
Collaborator

Hi @rnjudge, sorry for the difficulties. Could you please show me the exact commands you used and in what order? That will help me debug.

@jspeed-meyers jspeed-meyers added the bug Something isn't working label Jan 24, 2023
@rnjudge
Copy link
Author

rnjudge commented Jan 24, 2023

Figured it out :) For future users who may have this issue: make sure pipenv is properly installed (I had originally installed with apt install instead of pip install) and also that pipenv is properly installed in /usr/local/bin and available in your path. I'll close this! Thanks @jspeed-meyers

@rnjudge
Copy link
Author

rnjudge commented Jan 24, 2023

@jspeed-meyers Now that I have it working, I can bother you with other questions about the output of the tool ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants