radiasoft / download

Install scripts for "curl | bash"
Apache License 2.0
3 stars 5 forks source link

pip show foo error #711

Open e-carlin opened 3 months ago

e-carlin commented 3 months ago

On the latest sirepo.com/jupyter in a recently restarted server I get this error

$ pip show tornado
ERROR: Exception:
Traceback (most recent call last):
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3070, in _dep_map
    return self.__dep_map
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2863, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 179, in exc_logging_wrapper
    status = run_func(*args)
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_internal/commands/show.py", line 46, in run
    if not print_results(
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_internal/commands/show.py", line 178, in print_results
    for i, dist in enumerate(distributions):
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_internal/commands/show.py", line 114, in search_packages_info
    required_by = sorted(_get_requiring_packages(dist), key=str.lower)
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_internal/commands/show.py", line 95, in <genexpr>
    in {canonicalize_name(d.name) for d in dist.iter_dependencies()}
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_internal/metadata/pkg_resources.py", line 247, in iter_dependencies
    return self._dist.requires(extras)
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2786, in requires
    dm = self._dep_map
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3072, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3089, in _compute_dependencies
    common = types.MappingProxyType(dict.fromkeys(reqs_for_extra(None)))
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3086, in reqs_for_extra
    if not req.marker or req.marker.evaluate({'extra': extra}):
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_vendor/packaging/markers.py", line 325, in evaluate
    return _evaluate_markers(self._markers, current_environment)
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_vendor/packaging/markers.py", line 225, in _evaluate_markers
    groups[-1].append(_eval_op(lhs_value, op, rhs_value))
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_vendor/packaging/markers.py", line 183, in _eval_op
    return spec.contains(lhs, prereleases=True)
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_vendor/packaging/specifiers.py", line 552, in contains
    normalized_item = _coerce_version(item)
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_vendor/packaging/specifiers.py", line 28, in _coerce_version
    version = Version(version)
  File "/home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages/pip/_vendor/packaging/version.py", line 202, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
pip._vendor.packaging.version.InvalidVersion: Invalid version: 'x86_64'

You can swap out any package with tornado. The problem seems to be with pip. pip install --upgrade pip==24.0 fixes it.

e-carlin commented 3 months ago

Seeing this when doing a beamsim build. Just a warning in the build

#7 1635.1 Building wheels for collected packages: rsjupyterlab
#7 1635.1   Building wheel for rsjupyterlab (pyproject.toml): started
#7 1692.6   Building wheel for rsjupyterlab (pyproject.toml): finished with status 'done'
#7 1692.6   Created wheel for rsjupyterlab: filename=rsjupyterlab-0.1.0-py3-none-any.whl size=30315 sha256=8711166acc9b7967d8d3566c91e2d650ddf07751474791c3ea2e00fe07c1cbcf
#7 1692.6   Stored in directory: /tmp/pip-ephem-wheel-cache-mhvqrk1m/wheels/6e/3c/6d/a760987e916b78c78bd73361180c71c0e977d108465f5c47fd
#7 1692.6 Successfully built rsjupyterlab
#7 1693.5 WARNING: Error parsing dependencies of ocp: Invalid version: 'x86_64'