3 things to evaluate to discover the best way for you to access web data.Register for the webinar
Start a new topic

ImportError: cannot import name 'SourceDistribution' from 'pip._internal.distributions.source'

  

Step 1/3 : FROM alpine:3.5
 ---> f80194ae2e0c
Step 2/3 : ADD kumo-entrypoint /kumo-entrypoint
 ---> Using cache
 ---> 2752dcbcb535
Step 3/3 : RUN chmod +x /kumo-entrypoint
 ---> Using cache
 ---> d8206e165c91
Successfully built d8206e165c91
Successfully tagged kumo-entrypoint:latest
Entrypoint container is created successfully
>>> Checking python dependencies
Warning: Pip checks failed, please fix the conflicts.
WARNING: There're some errors when doing pip-check:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/app/python/lib/python3.7/site-packages/pip/__main__.py", line 19, in <module>
    sys.exit(_main())
  File "/app/python/lib/python3.7/site-packages/pip/_internal/cli/main.py", line 73, in main
    command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
  File "/app/python/lib/python3.7/site-packages/pip/_internal/commands/__init__.py", line 96, in create_command
    module = importlib.import_module(module_path)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  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 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/app/python/lib/python3.7/site-packages/pip/_internal/commands/check.py", line 7, in <module>
    from pip._internal.operations.check import (
  File "/app/python/lib/python3.7/site-packages/pip/_internal/operations/check.py", line 14, in <module>
    from pip._internal.distributions import (
  File "/app/python/lib/python3.7/site-packages/pip/_internal/distributions/__init__.py", line 1, in <module>
    from pip._internal.distributions.source import SourceDistribution
ImportError: cannot import name 'SourceDistribution' from 'pip._internal.distributions.source' (/app/python/lib/python3.7/site-packages/pip/_internal/distributions/source/__init__.py)
{"message": "Dependencies check exit code: 1", "details": "Pip checks failed, please fix the conflicts", "error": "requirements_error"} 

  


With no changes we have started to get the above error. 


We get it with the 1.7-py3 stack and the 1.8-py3 stack


Our requirements.txt


 

#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile
#
certifi==2019.9.11        # via requests
chardet==3.0.4            # via requests
click==7.0                # via pip-tools
idna==2.8                 # via requests
msgpack==0.6.2            # via scrapinghub
pip-tools==4.1.0
python-dotenv==0.10.3
requests==2.22.0          # via scrapinghub
retrying==1.3.3           # via scrapinghub
scrapinghub[msgpack]==2.2.1
six==1.12.0               # via pip-tools, retrying, scrapinghub
urllib3==1.25.6           # via requests

 

We have tried upgrading our requirements to the latest but still the same error.


The error seems out of our control.


Could it be this pip issue? https://github.com/pypa/pip/issues/7217


We have tried to specify a pip version in requirements.txt but we just get a different error (and it's not recommended)


Thanks

Login to post a comment