verigak / progress

Easy to use progress bars for Python
ISC License
1.41k stars 179 forks source link

FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.6/dist-packages/progress-1.5-py3.6.egg' #92

Open ChaiBapchya opened 3 years ago

ChaiBapchya commented 3 years ago

Upon installing a python package I see a failure

Successfully installed MarkupSafe-1.1.1 PyYAML-5.4.1 argparse-1.4.0 aws-parallelcluster-2.10.1 boto3-1.17.5 botocore-1.20.5 cmake-3.18.4.post1 future-0.18.2 ipaddress-1.0.23 jinja2-2.11.3 jmespath-0.10.0 progress-1.5 python-dateutil-2.8.1 s3transfer-0.3.4 setuptools-53.0.0 six-1.15.0 smdistributed-dataparallel-1.0.0 tabulate-0.8.7 urllib3-1.26.3
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/main.py", line 75, in main
    return command.main(cmd_args)
  File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/base_command.py", line 121, in main
    return self._main(args)
  File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/base_command.py", line 265, in _main
    self.handle_pip_version_check(options)
  File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/req_command.py", line 152, in handle_pip_version_check
    timeout=min(5, options.timeout)
  File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/req_command.py", line 97, in _build_session
    index_urls=self._get_index_urls(options),
  File "/usr/local/lib/python3.6/dist-packages/pip/_internal/network/session.py", line 249, in __init__
    self.headers["User-Agent"] = user_agent()
  File "/usr/local/lib/python3.6/dist-packages/pip/_internal/network/session.py", line 159, in user_agent
    setuptools_version = get_installed_version("setuptools")
  File "/usr/local/lib/python3.6/dist-packages/pip/_internal/utils/misc.py", line 665, in get_installed_version
    working_set = pkg_resources.WorkingSet()
  File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 567, in __init__
    self.add_entry(entry)
  File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 623, in add_entry
    for dist in find_distributions(entry, True):
  File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1983, in find_eggs_in_zip
    if metadata.has_metadata('PKG-INFO'):
  File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1414, in has_metadata
    return self._has(path)
  File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1854, in _has
    return zip_path in self.zipinfo or zip_path in self._index()
  File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1731, in zipinfo
    return self._zip_manifests.load(self.loader.archive)
  File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1688, in load
    mtime = os.stat(path).st_mtime
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.6/dist-packages/progress-1.5-py3.6.egg'

However, I verified that file exists

RUN ls /usr/local/lib/python3.6/dist-packages/ | grep progress
 ---> Running in 865f7a7e5dd5
progress-1.5-py3.6.egg
ChaiBapchya commented 3 years ago

I tried to update pip version

Step 8/11 : RUN pip install -U pip
 ---> Running in 384bd9d623bc
Collecting pip
  Downloading pip-21.0.1-py3-none-any.whl (1.5 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.2.3
    Uninstalling pip-20.2.3:
      Successfully uninstalled pip-20.2.3
Successfully installed pip-21.0.1
Removing intermediate container 384bd9d623bc
 ---> 30bc4e8dedd0

But even after doing that, I get the same failure.