Le 19/08/2025 à 11:12, xiao sheng wen(肖盛文) a écrit :
Hi,

I had try the following update, and rebuild package to test,
but issue is still exist:


/usr/lib/python3/dist-packages/trimage/trimage.py contains

`from ThreadPool import ThreadPool` while it should be either:

- `from .ThreadPool import ThreadPool`

Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/trimage/trimage.py", line 16, in 
<module>
     from .ThreadPool import ThreadPool
ImportError: attempted relative import with no known parent package


- or `from trimage.ThreadPool import ThreadPool`

Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/trimage/trimage.py", line 16, in 
<module>
     from trimage.ThreadPool import ThreadPool
   File "/usr/lib/python3/dist-packages/trimage/trimage.py", line 16, in 
<module>
     from trimage.ThreadPool import ThreadPool
ModuleNotFoundError: No module named 'trimage.ThreadPool'; 'trimage' is not a 
package

Regards,


That's because of the non-idiomatic runner in /bin. Try with:

    python3 -m trimage.trimage

Actually the runner in /bin should be a wrapper entrypoint script generated by the package generator like setuptools, but at least executing like `python3 -m trimage.trimage` is still better than currently.

Reply via email to