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

Remove support for installed .egg distributions when using the importlib.metadata backend #12330

Open
sbidoul opened this issue Oct 8, 2023 · 38 comments · May be fixed by #12308
Open

Remove support for installed .egg distributions when using the importlib.metadata backend #12330

sbidoul opened this issue Oct 8, 2023 · 38 comments · May be fixed by #12308
Labels
type: deprecation Related to deprecation / removal.
Milestone

Comments

@sbidoul
Copy link
Member

sbidoul commented Oct 8, 2023

pip has dropped support for installing .egg distributions when it stopped invoking setup.py install.
At some point pip will abandon support for detecting and uninstalling legacy .egg distributions too.

If you reach this issue from the pip deprecation message, it is likely that your Python environment has distributions that have been installed with setup.py install, easy_install, or an older pip version.

The recommended action is to uninstall the distribution and reinstall it with a recent pip.

@sbidoul
Copy link
Member Author

sbidoul commented Nov 27, 2023

@hanivianka have you tried the recommended action mentioned in the top post of this page?

@tahayparker
Copy link

@sbidoul has pip 24.3 been released? im tired of seeing the bright message pop up on an otherwise dark screen

@sbidoul
Copy link
Member Author

sbidoul commented Dec 3, 2023

@tahayparker 24.3 is planned for October 2024.

It is important that affected users resolve the warning by applying the recommendation in the first post of this page.

@loong2004
Copy link

Hello sir, could you please do me a favor? the picture below is the content of my file
image
I ran "python setup.py install", but after that there is something wrong. You can see it below:
image
What should I do? I would appreciate it for your kindness. Thank you anyway.

@anthobio23
Copy link

anthobio23 commented Dec 18, 2023

The problem is based on PIP updating. update to 23.3.2, rebuild the build.

first, delete the build and the dist plus the .egg.info folder.
rm -rf build dist *.egg.info

build build:

python3 -m pip install --upgrade build
python3 -m build

then, the twine:

python3 -m pip install --upgrade twine
python3 -m twine upload dist/*

view document here: Packaging Python Projects

@jdu211171
Copy link

jdu211171 commented Dec 25, 2024

$ pip install --upgrade --force-reinstall pipes
Defaulting to user installation because normal site-packages is not writeable
DEPRECATION: Loading egg at /usr/lib/python3.13/site-packages/gpg-1.23.2-py3.13-linux-x86_64.egg is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at https://github.com/pypa/pip/issues/12330
ERROR: Could not find a version that satisfies the requirement pipes (from versions: none)
ERROR: No matching distribution found for pipes
$ pip3 install --upgrade --force-reinstall pipes
Defaulting to user installation because normal site-packages is not writeable
DEPRECATION: Loading egg at /usr/lib/python3.13/site-packages/gpg-1.23.2-py3.13-linux-x86_64.egg is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at https://github.com/pypa/pip/issues/12330
ERROR: Could not find a version that satisfies the requirement pipes (from versions: none)
ERROR: No matching distribution found for pipes

What should I do? Please Help someone

@RonnyPfannschmidt
Copy link
Contributor

@jdu211171 at first glance it seems like a distro level install is broken

Please report this to your distro

@skunetlab1
Copy link

mamba run pip install -U smp build twine

@owainkenwayucl
Copy link

owainkenwayucl commented Jan 14, 2025

Nice to see that NGC containers e.g. https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch/tags have this problem still.

DEPRECATION: Loading egg at /usr/local/lib/python3.12/dist-packages/dill-0.3.9-py3.12.egg is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at /usr/local/lib/python3.12/dist-packages/igraph-0.11.8-py3.12-linux-aarch64.egg is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at /usr/local/lib/python3.12/dist-packages/lightning_thunder-0.2.0.dev0-py3.12.egg is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at /usr/local/lib/python3.12/dist-packages/lightning_utilities-0.11.9-py3.12.egg is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at /usr/local/lib/python3.12/dist-packages/looseversion-1.3.0-py3.12.egg is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at /usr/local/lib/python3.12/dist-packages/nvfuser-0.2.13a0+0d33366-py3.12-linux-aarch64.egg is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at /usr/local/lib/python3.12/dist-packages/opt_einsum-3.4.0-py3.12.egg is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at /usr/local/lib/python3.12/dist-packages/texttable-1.7.0-py3.12.egg is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at https://github.com/pypa/pip/issues/12330

😭

whitneywhtsang added a commit to intel/intel-xpu-backend-for-triton that referenced this issue Jan 15, 2025
Before this PR different versions of `triton-kernels-benchmark` can
coexist, which is an unexpected/incorrect behavior. And it is possible
that the old version has a hash that is lexicographically higher in the
sort, which causes the old version to be unexpectedly used.

More details can be found here: pypa/pip#12330

Signed-off-by: Whitney Tsang <[email protected]>
@justvanrossum
Copy link

Hi, I'm the maintainer of py2app and have an issue a user that runs into this change when bundling pip as part of an application packaged with py2app. Py2app bundles the used bits of the standard library and other packages used by the app (in this case including pip) into a zip file in the macOS app bundle.

Do you have any hints on what might trigger the .egg detection for this use case?

@ronaldoussoren it might be you are hitting pkg_resources.find_eggs_in_zip, which seems to look for .egg-info metadata directories. Do you have those in the bundle?

@sbidoul We do not have .egg-info dirs in the .zip file, if that's what you mean. The .zip file is on sys.path.

The warning we're seeing is this:

DEPRECATION: Loading egg at /Users/just/code/git/drawbot/dist/DrawBot.app/Contents/Resources/lib/python312.zip is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at https://github.com/pypa/pip/issues/12330

@justvanrossum
Copy link

DEPRECATION: Loading egg

Followup: the zip file does contain these kinds of entries:

  • modulename
  • modulename-0.2.3.dist-info

If I remove the .dist-info folder, the warning goes away.

@uranusjr
Copy link
Member

uranusjr commented Feb 7, 2025

Hmm, I’m not even sure loading .dist-info from a zip is even an intended feature, or if we want to continue support it or not. The warning (and the wholde deprecation) is supposed to only apply to loading .egg-info from a zip. We should have a separate issue to discuss this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: deprecation Related to deprecation / removal.
Projects
None yet
Development

Successfully merging a pull request may close this issue.