pypa/pip

Remove support for installed `.egg` packages when using the `importlib.metadata` backend

sbidoul opened this issue · 42 comments

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

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

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

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

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

@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.

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.

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

Defaulting to user installation because normal site-packages is not writeable
DEPRECATION: Loading egg at c:\program files\python312\lib\site-packages\vboxapi-1.0-py3.12.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at #12330

Full error:
Defaulting to user installation because normal site-packages is not writeable
DEPRECATION: Loading egg at c:\program files\python312\lib\site-packages\vboxapi-1.0-py3.12.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at #12330
Requirement already satisfied: cloudflare in c:\users\aliza\appdata\roaming\python\python312\site-packages (2.16.0)
Requirement already satisfied: requests in c:\users\aliza\appdata\roaming\python\python312\site-packages (from cloudflare) (2.31.0)
Requirement already satisfied: pyyaml in c:\users\aliza\appdata\roaming\python\python312\site-packages (from cloudflare) (6.0.1)
Requirement already satisfied: jsonlines in c:\users\aliza\appdata\roaming\python\python312\site-packages (from cloudflare) (4.0.0)
Requirement already satisfied: attrs>=19.2.0 in c:\users\aliza\appdata\roaming\python\python312\site-packages (from jsonlines->cloudflare) (23.2.0)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\aliza\appdata\roaming\python\python312\site-packages (from requests->cloudflare) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in c:\users\aliza\appdata\roaming\python\python312\site-packages (from requests->cloudflare) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\aliza\appdata\roaming\python\python312\site-packages (from requests->cloudflare) (2.1.0)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\aliza\appdata\roaming\python\python312\site-packages (from requests->cloudflare) (2023.11.17)
PS C:\Users\aliza\Desktop\myproject> python .\manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

Exception in thread django-main-thread:
Traceback (most recent call last):
File "C:\Program Files\Python312\Lib\threading.py", line 1052, in _bootstrap_inner
self.run()
File "C:\Program Files\Python312\Lib\threading.py", line 989, in run
self._target(*self._args, **self.kwargs)
File "C:\Users\aliza\AppData\Roaming\Python\Python312\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "C:\Users\aliza\AppData\Roaming\Python\Python312\site-packages\django\core\management\commands\runserver.py", line 133, in inner_run
self.check(display_num_errors=True)
File "C:\Users\aliza\AppData\Roaming\Python\Python312\site-packages\django\core\management\base.py", line 485, in check
all_issues = checks.run_checks(
^^^^^^^^^^^^^^^^^^
File "C:\Users\aliza\AppData\Roaming\Python\Python312\site-packages\django\core\checks\registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\aliza\AppData\Roaming\Python\Python312\site-packages\django\core\checks\urls.py", line 14, in check_url_config
return check_resolver(resolver)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\aliza\AppData\Roaming\Python\Python312\site-packages\django\core\checks\urls.py", line 24, in check_resolver
return check_method()
^^^^^^^^^^^^^^
File "C:\Users\aliza\AppData\Roaming\Python\Python312\site-packages\django\urls\resolvers.py", line 516, in check
for pattern in self.url_patterns:
^^^^^^^^^^^^^^^^^
File "C:\Users\aliza\AppData\Roaming\Python\Python312\site-packages\django\utils\functional.py", line 47, in get
res = instance.dict[self.name] = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\aliza\AppData\Roaming\Python\Python312\site-packages\django\urls\resolvers.py", line 735, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\aliza\AppData\Roaming\Python\Python312\site-packages\django\utils\functional.py", line 47, in get
res = instance.dict[self.name] = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\aliza\AppData\Roaming\Python\Python312\site-packages\django\urls\resolvers.py", line 728, in urlconf_module
return import_module(self.urlconf_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\importlib_init
.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1381, in _gcd_import
File "", line 1354, in _find_and_load
File "", line 1325, in _find_and_load_unlocked
File "", line 929, in _load_unlocked
File "", line 994, in exec_module
File "", line 488, in call_with_frames_removed
File "C:\Users\aliza\Desktop\myproject\myproject\urls.py", line 7, in
path("auth/", include("authentication.urls")),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\aliza\AppData\Roaming\Python\Python312\site-packages\django\urls\conf.py", line 38, in include
urlconf_module = import_module(urlconf_module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\importlib_init
.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1381, in _gcd_import
File "", line 1354, in _find_and_load
File "", line 1325, in _find_and_load_unlocked
File "", line 929, in _load_unlocked
File "", line 994, in exec_module
File "", line 488, in _call_with_frames_removed
File "C:\Users\aliza\Desktop\myproject\authentication\urls.py", line 3, in
from . import views
File "C:\Users\aliza\Desktop\myproject\authentication\views.py", line 5, in
import cloudflare
ModuleNotFoundError: No module named 'cloudflare'
PS C:\Users\aliza\Desktop\myproject> ^C

@kinseyy the deprecation warning you are facing is due to way vboxapi was installed, and likely unrelated to the error you are facing. Please look at the original post in this issue for a solution.

Hi, dude. It's true that I have run the command with "setup.py install" on my Windows terminal. So what should I do next? Could you please show me the instructions in detail? Thank you for your generosity.

egg distributions

Can you give an example how to solve that issue to the people like me that is not so fluent in phytonese, please? :-) Thanks.

Can you give an example how to solve that issue to the people like me that is not so fluent in phytonese, please?

Rebuild your environment using the latest version of pip. If you don't know how to rebuild your environment, then I'm assuming that was something that was either done for you, or done as a result of you following a set of instructions that someone provided for you. If that's the case, then you should probably discuss how to rebuild the environment with whoever gave you the environment/instructions.

As an aside, in general I would strongly recommend that anyone who is using pip to install Python packages should learn the basics of what an environment is and how you build and manage one. It's fairly fundamental to how you install packages in Python. There are certainly situations where you can be provided with a Python environment that you should "just use", without needing to know how to manage it, but in that situation I would advise against using pip yourself - you should get packages installed into the environment using tools (or administrative processes) provided by whoever supplies the environment.

您好,先生,您能帮我一个忙吗?下图是我运行“python setup.py install”的文件图像内容,但之后出现了问题。你可以在下面看到它:image我该怎么办?感谢您的好意,我将不胜感激。无论如何,谢谢你。

I also want to know what should I do in a similar situation. Who can help me?

I also want to know what should I do in a similar situation. Who can help me?

From the original post:

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

So this is just a short comment; I am struggling right now with the python transition from
3.11.x to python 3.12.x. So many things depend on the python stack these days, and it is
suddenly harder to install things from source (for me at the least).

For instance tracker says this:

meson.build:101:26: ERROR: python3 is missing modules: gi

But I installed gi via:

pip install gobject PyGObject

This has worked well in the past, but suddenly the whole python packaging
scheme seems to be confused. I get tons of annoying "do this, do that", e. g.
"don't use setuptools, use pip, don't use distutils, use that, just use this now,
and then that". And it then still does not work.

Have those upstream who decided on this, thought about these downstream
issues? Yes you can say this is all the users' fault and it can all be resolved,
but why make it harder in the first place? IF the rationale is to make the use
of python easier and python in the future, then clear documentation should
be used and broadcasted, as well as a transition path documented. Right now
I am not sure what that is, since things that used to work no longer work. I
am aware this is not solely the fault of python or pip, as meson also plays
a role (and it also changed recently ... all that new "meson setup" we suddenly
have to use). It's all quite frustrating to have to deal with this ...

While I understand the frustration, please keep in mind that the python ecosystem has been working on migration away from fundamentally broken tooling to enable better setup

That's this hits down streams as surprise again and again after years of communicating new standards, warning about the issue simply shows that nobody really cares about the actual progress until their little broken setup is finally affected after practically years of graceful communication

As to why make it seem harder

Same reason why washing hands between obduction and birth help was introduced

liurd commented

What's the best solution for this?

` pip install .\ffmpy-0.3.2.tar.gz
Processing c:\project\ffmpy-0.3.2.tar.gz
Installing build dependencies ... error
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001D6DDA09650>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001D6DBD24E50>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001D6DDA0AD10>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001D6DDA0B990>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001D6DDA0B350>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)
ERROR: No matching distribution found for setuptools>=40.8.0
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.`

What's the best solution for this?

  1. This is not related to the issue you posted it to.
  2. As the message says, "This error originates from a subprocess, and is likely not a problem with pip."
  3. The error is a ConnectTimeoutError (a network issue), so you should be looking at your network setup, not at pip, anyway.

(Please do not post screenshots, copy the text into the issue.)

Did you read the original message in this post? It clearly states:

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

I will also note the warning in the output you show, that you should not be running pip as root, as this can result in breakage. You should be maintaining your system packages with your system package manager, unless you are sure you know what you are doing. Your comment ".I don't know .. how to solve this issue" in #12575 makes it pretty clear you don't have the experience to run pip as root safely, so I would strongly recommend that you use the system package manager instead in this case.

@sbidoul Question, and sorry if I missed this bit of information somewhere, but what is the outcome if one does not reinstall the package with pip ?

Will pip 24.3 ignore that the package X is installed, will an error be raised ?

Thanks,

@ccoulombe I don't think this has been determined precisely yet. There is a fair chance that when this happens the environment where .eggs are installed will become difficult to use with pip until the eggs are removed manually.

That is why we are giving ample time to migrate, but at some point people will need stop using setup.py install if they want to continue using modern versions of pip.

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?

The issue on my end: ronaldoussoren/py2app#521

@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?

Alternatively, and this seemed to work for me, I went and uninstalled pip, give or take a few other things I did which may or may not have actually impacted the outcome... such as deleting the .egg files, deleting env's, trying a bunch of cd insert\file\path\here(namely entering the paths so as to delete whats in them as seen here; https://stackoverflow.com/a/60318668) & deleting stuff in appdata(C:\Users\Me\AppData\Local\ActiveState\cache)... But that was me mostly raging & getting nothing done ngl, so uhh, just skip that stuff and jump right to deleting pip.exe located in your main install and then reinstall it with get-pip.py or something.
I'm new to this all myself, and I gotta say, this is not one of python's strong points, but damnit, its stronger than other languages so far based on my admittedly minimal level of experience, so take this with a grain of salt - not the solution, but the advice on skipping what I did, cause for all I know, those paths & things could prove helpful in solving, causing, locating, or being the source of that same issue, but caused in different ways.

show error

 Building wheel for llama-cpp-python (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for llama-cpp-python (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      *** scikit-build-core 0.9.6 using CMake 3.29.6 (wheel)
      *** Configuring CMake...
      2024-06-27 17:26:29,065 - scikit_build_core - WARNING - Can't find a Python library, got libdir=None, ldlibrary=None, multiarch=None, masd=None
      loading initial cache file C:\Users\aarsh\AppData\Local\Temp\tmpcm_ful1v\build\CMakeInit.txt
      -- Building for: NMake Makefiles
      CMake Error at CMakeLists.txt:3 (project):
        Running

         'nmake' '-?'

        failed with:

         no such file or directory


      CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
      CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
      -- Configuring incomplete, errors occurred!

      *** CMake configuration failed
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for llama-cpp-python
Failed to build llama-cpp-python
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (llama-cpp-python)

while installing the llama-cpp-python

@Aarsh01 this issue is meant to track deprecated usages of .egg distributions. Your report is not related. You should reach to the developers of llama-cpp-python for help in building the project from source. Alternatively, you can install the pre-built wheel for llama-cpp-python as described in their documentation.

I used this line of code "!pip install mysql.connector" in the jupiter then notebook then it gives me big error "Defaulting to user installation because normal site-packages is not writeable
Collecting mysql.connector
Downloading mysql-connector-2.2.9.tar.gz (11.9 MB)
---------------------------------------- 0.0/11.9 MB ? eta -:--:--
---------------------------------------- 0.0/11.9 MB ? eta -:--:--
--------------------------------------- 0.0/11.9 MB 131.3 kB/s eta 0:01:31
--------------------------------------- 0.0/11.9 MB 131.3 kB/s eta 0:01:31
--------------------------------------- 0.0/11.9 MB 196.9 kB/s eta 0:01:00
--------------------------------------- 0.1/11.9 MB 280.5 kB/s eta 0:00:42
-------------------------------------- 0.2/11.9 MB 811.5 kB/s eta 0:00:15
- -------------------------------------- 0.6/11.9 MB 1.7 MB/s eta 0:00:07
-- ------------------------------------- 0.7/11.9 MB 1.9 MB/s eta 0:00:06
-- ------------------------------------- 0.9/11.9 MB 2.1 MB/s eta 0:00:06
--- ------------------------------------ 1.1/11.9 MB 2.3 MB/s eta 0:00:05
---- ----------------------------------- 1.3/11.9 MB 2.5 MB/s eta 0:00:05
----- ---------------------------------- 1.6/11.9 MB 2.6 MB/s eta 0:00:04
------ --------------------------------- 2.0/11.9 MB 3.0 MB/s eta 0:00:04
------- -------------------------------- 2.3/11.9 MB 3.2 MB/s eta 0:00:03
-------- ------------------------------- 2.6/11.9 MB 3.5 MB/s eta 0:00:03
--------- ------------------------------ 2.9/11.9 MB 3.7 MB/s eta 0:00:03
---------- ----------------------------- 3.2/11.9 MB 3.8 MB/s eta 0:00:03
----------- ---------------------------- 3.5/11.9 MB 4.0 MB/s eta 0:00:03
------------- -------------------------- 3.9/11.9 MB 4.1 MB/s eta 0:00:02
-------------- ------------------------- 4.2/11.9 MB 4.3 MB/s eta 0:00:02
--------------- ------------------------ 4.5/11.9 MB 4.4 MB/s eta 0:00:02
---------------- ----------------------- 4.9/11.9 MB 4.5 MB/s eta 0:00:02
----------------- ---------------------- 5.2/11.9 MB 4.6 MB/s eta 0:00:02
------------------ --------------------- 5.6/11.9 MB 4.7 MB/s eta 0:00:02
------------------- -------------------- 5.9/11.9 MB 4.8 MB/s eta 0:00:02
-------------------- ------------------- 6.2/11.9 MB 4.9 MB/s eta 0:00:02
---------------------- ----------------- 6.5/11.9 MB 4.9 MB/s eta 0:00:02
---------------------- ----------------- 6.8/11.9 MB 4.9 MB/s eta 0:00:02
----------------------- ---------------- 7.1/11.9 MB 5.0 MB/s eta 0:00:01
------------------------ --------------- 7.4/11.9 MB 5.1 MB/s eta 0:00:01
-------------------------- ------------- 7.7/11.9 MB 5.1 MB/s eta 0:00:01
--------------------------- ------------ 8.0/11.9 MB 5.1 MB/s eta 0:00:01
---------------------------- ----------- 8.3/11.9 MB 5.2 MB/s eta 0:00:01
----------------------------- ---------- 8.6/11.9 MB 5.3 MB/s eta 0:00:01
------------------------------ --------- 8.9/11.9 MB 5.3 MB/s eta 0:00:01
------------------------------ --------- 9.1/11.9 MB 5.2 MB/s eta 0:00:01
------------------------------- -------- 9.4/11.9 MB 5.2 MB/s eta 0:00:01
-------------------------------- ------- 9.8/11.9 MB 5.3 MB/s eta 0:00:01
---------------------------------- ----- 10.1/11.9 MB 5.3 MB/s eta 0:00:01
----------------------------------- ---- 10.4/11.9 MB 6.1 MB/s eta 0:00:01
------------------------------------ --- 10.7/11.9 MB 6.1 MB/s eta 0:00:01
------------------------------------- -- 11.0/11.9 MB 6.3 MB/s eta 0:00:01
-------------------------------------- - 11.3/11.9 MB 6.4 MB/s eta 0:00:01
--------------------------------------- 11.7/11.9 MB 6.5 MB/s eta 0:00:01
--------------------------------------- 11.8/11.9 MB 6.6 MB/s eta 0:00:01
---------------------------------------- 11.9/11.9 MB 6.5 MB/s eta 0:00:00
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: mysql.connector
Building wheel for mysql.connector (setup.py): started
Building wheel for mysql.connector (setup.py): finished with status 'done'
Created wheel for mysql.connector: filename=mysql_connector-2.2.9-cp311-cp311-win_amd64.whl size=247958 sha256=0ec0de172e82f6d16c5e4a5bc79fb5c1eee319b36d98198a5d03e9d8dc3b3d91
Stored in directory: c:\users\om\appdata\local\pip\cache\wheels\17\cd\ed\2d49e9bac69cf09382e4c7cc20a2511202b48324b87db26019
Successfully built mysql.connector
Installing collected packages: mysql.connector
Successfully installed mysql.connector-2.2.9
DEPRECATION: Loading egg at c:\programdata\anaconda3\lib\site-packages\vboxapi-1.0-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at #12330
pip install --upgrade vboxapi

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: vboxapi in c:\programdata\anaconda3\lib\site-packages\vboxapi-1.0-py3.11.egg (1.0)
Note: you may need to restart the kernel to use updated packages.
DEPRECATION: Loading egg at c:\programdata\anaconda3\lib\site-packages\vboxapi-1.0-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at #12330". How i solve this error?

How i solve this error?

You're installing the wrong package: https://pypi.org/project/mysql-connector/.

You should be using: https://pypi.org/project/mysql-connector-python/

As there is very limited support capacity here if you are having problem installing a package, you should:

  1. Check the PyPI page or home page of the package for installation instructions
  2. Ask peers or search/post in help forums, such as Python Discuss help category, /r/learnpython on reddit, Python Discord's #python-help channel, #python on Libera.chat (IRC), python-list or python-tutor mailing lists, or StackOverflow
  3. File a bug with the package author

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

What if pip is NOT installed from source? But just upgraded directly by pip install -U pip ?

any solution found? is it possible to use a previous version? so that it works... How can an update be inserted which compromises the development...

@PauloBoaventura From the original post:

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

hao to update the pip?
i use the way from internet but it not work
image

$ 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

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

Please report this to your distro

mamba run pip install -U smp build twine

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

😭

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

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.

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.

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.

Which distribution to uninstall? (and how?)
Are you referring to the OS distribution? Or to all of python? Or just the pip module?

关键是用PIP总是无法安装成功,我的win11系统,4060TI显卡,8G显存,32G内存,虚拟环境中安装的是CUDA12.1 pytorch2.51,求路过的大师给个建议,安装哪个版本的apex可行。

Which distribution to uninstall? (and how?) Are you referring to the OS distribution? Or to all of python? Or just the pip module?

@fabriciorsf the package that pip is complaining about. You can simply use pip uninstall and pip install to reinstall it which should replace it with the modern metadata.

关键是用PIP总是无法安装成功,我的win11系统,4060TI显卡,8G显存,32G内存,虚拟环境中安装的是CUDA12.1 pytorch2.51,求路过的大师给个建议,安装哪个版本的apex可行。

The recommended action is to uninstall the package and reinstall it with a recent pip.
把警告的包卸掉重新装: pip uninstall xxx; pip install xxx