0ssamaak0 / CLIPPyX

AI Powered Image search tool offers content-based, text, and visual similarity system-wide search.
MIT License
188 stars 16 forks source link

bug: The wheel is invalid: invalid console script: 'main' - clippyx-0.1-py3-none-any.whl #19

Open sammcj opened 1 day ago

sammcj commented 1 day ago

Neat project!

When trying to install following the readme, Python errors out stating the wheel is invalid:

[main] ~/git/CLIPPyX $ uv venv; source .venv/bin/activate
Using Python 3.12.7 interpreter at: /Users/samm/.pyenv/versions/3.12.7/bin/python3
Creating virtualenv at: .venv

(CLIPPyX) [main] ~/git/CLIPPyX $ pip install -e . -U
using uv for pip...
   Built file:///Users/samm/git/CLIPPyX                                                                                                                                                       Built 1 editable in 458ms
Resolved 149 packages in 39ms
error: Failed to install: clippyx-0.1-py3-none-any.whl (clippyx==0.1 (from file:///Users/samm/git/CLIPPyX))
  Caused by: The wheel is invalid: invalid console script: 'main'

Interestingly running python setup.py install works, but then running the app crashes with:

CLIPPyX --settings
Traceback (most recent call last):
  File "/Users/samm/git/CLIPPyX/.venv/bin/CLIPPyX", line 33, in <module>
    sys.exit(load_entry_point('CLIPPyX==0.1', 'console_scripts', 'CLIPPyX')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/samm/git/CLIPPyX/.venv/bin/CLIPPyX", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/Users/samm/.pyenv/versions/3.12.7/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/samm/.pyenv/versions/3.12.7/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'main'

And installing directly without a venv also fails:

ERROR: For req: CLIPPyX==0.1. Invalid script entry point: <ExportEntry CLIPPyX = main:None []> - A callable suffix is required. Cf https://packaging.python.org/specifications/entry-points/#use-for-scripts for more information.
jmtemmos commented 1 day ago

Same error here : ERROR: For req: CLIPPyX==0.1. Invalid script entry point: <ExportEntry CLIPPyX = main:None []> - A callable suffix is required.

0ssamaak0 commented 18 hours ago

Are u using conda or python venv?

sammcj commented 18 hours ago

Standard python venv, conda is too chonky for me.

0ssamaak0 commented 5 hours ago

can you run main.py?