pypa / pip

The Python package installer
https://pip.pypa.io/
MIT License
9.51k stars 3.02k forks source link

Modules installed with pip don't work after Daedalus upgrade #12240

Closed vrgovinda closed 6 months ago

vrgovinda commented 1 year ago

Description

I recently upgraded to Devuan Daedalus from Chimaera -- which means I can't install python packages using pip. Therefore, I chose pipx.

I am aware that installation of python packages requires a different method as compared to pip install <package>. Therefore, I install new python packages using pipx which works well.

Question: The packages that have already been installed using pip don't work as they were working before. For example, I had installed pdfCropMargins using pip and have used it extensively before upgrading to Bookworm.

After the upgrade, I get the following error:

pdf-crop-margins -a 5 pgfmanual.pdf 
Traceback (most recent call last):
  File "/home/vrgovinda/.local/bin/pdf-crop-margins", line 5, in <module>
    from pdfCropMargins.pdfCropMargins import main
ModuleNotFoundError: No module named 'pdfCropMargins'

As per my understanding, I guess that pipx is now managing the python packages and is expecting the modules in some other location.

Am I right? If yes, how to resolve this issue?

If No, What is the reason for this error and how to resolve this issue?

Thanks in advance.

Expected behavior

I expect the packages installed with pip to work normally as before, which is not happening.

Let those installed with pipx be also available simultaneously. That's okay.

But those which were already installed with pip should work even after Debian has changed ways about pip.

pip version

23.0.1

Python version

3.11.2

OS

GNU/Linux Distro: Devuan Daedalus

How to Reproduce

  1. Use a Python package which was installed earlier with pip. I have taken an example of 'pdfCropMargins'.
  2. After upgrade to Daedalus, the packages installed with pip don't work, since the Python packages are now being externally managed.
  3. So I get an error ModuleNotFoundError: No module named 'pdfCropMargins'

Output

pdf-crop-margins -a 5 pgfmanual.pdf 
Traceback (most recent call last):
  File "/home/vrgovinda/.local/bin/pdf-crop-margins", line 5, in <module>
    from pdfCropMargins.pdfCropMargins import main
ModuleNotFoundError: No module named 'pdfCropMargins'

Code of Conduct

ichard26 commented 6 months ago

This does not have enough information for us to reliably point you towards the right solution.

You will probably be better served by reaching out to peers or 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.

This issue can be closed.