CLIPPyX icon indicating copy to clipboard operation
CLIPPyX copied to clipboard

ModuleNotFoundError: No module named 'mobileclip'

Open Yavuplogu opened this issue 1 year ago • 4 comments

Hi,

I went through the whole installation process and some errors occurred. If you're not a developer like me, some dependencies are not listed and it will cause problems like not having Microsoft Visual C++. Anyway, I solved all the problems except for one that I don't understand.

First of all, after running the pip install -e . command several times, there is only one error left (but it doesn't break the installation process):

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
streamlit 1.32.0 requires tenacity<9,>=8.1.0, but you have tenacity 9.0.0 which is incompatible. 

And then, after running the CLIPPyX command, I have this:

Traceback (most recent call last):
  File "C:\CLIPPyX\create_index.py", line 1, in <module>
    from Index.create_db import *
  File "C:\CLIPPyX\Index\create_db.py", line 21, in <module>
    from CLIP.mobile_clip import get_clip_image, get_clip_text
  File "C:\CLIPPyX\CLIP\mobile_clip.py", line 6, in <module>
    import mobileclip
ModuleNotFoundError: No module named 'mobileclip'
Traceback (most recent call last):
  File "C:\CLIPPyX\server.py", line 3, in <module>
    from Index.create_db import (
  File "C:\CLIPPyX\Index\create_db.py", line 21, in <module>
    from CLIP.mobile_clip import get_clip_image, get_clip_text
  File "C:\CLIPPyX\CLIP\mobile_clip.py", line 6, in <module>
    import mobileclip
ModuleNotFoundError: No module named 'mobileclip'
Traceback (most recent call last):
  File "\\?\C:\Users\USER1\anaconda3\Scripts\CLIPPyX-script.py", line 33, in <module>
    sys.exit(load_entry_point('CLIPPyX', 'console_scripts', 'CLIPPyX')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'module' object is not callable

I guess mobileclip is missing and I found nothing online to solve this issue. Maybe it is related to the first error, I don't know. Can you help me with this?

Thanks!

Yavuplogu avatar Sep 03 '24 10:09 Yavuplogu

Hi, I'm sorry. I'm currently working in a new version so the main branch docs are not updated. Check mobile CLIP installation here or just using HF transformers for clip model

0ssamaak0 avatar Sep 05 '24 06:09 0ssamaak0

I followed the setup process and I'm now stuck at:

To download pretrained checkpoints follow the code snippet below source get_pretrained_models.sh # Files will be downloaded to checkpoints directory.

It doesn't execute the command, and after searching for an answer, it seems that it's not actually a command. I need to place this snippet somewhere, but where? I'm sure it's obvious to you, but not to me... I feel like a dog frantically typing on a keyboard right now!

Yavuplogu avatar Sep 05 '24 07:09 Yavuplogu

Np at all, if you installed mobile clip correctly using pip, just select the variant you want (I recommend s0 for better performance) and it will download automatically from CLIPPyX

0ssamaak0 avatar Sep 05 '24 07:09 0ssamaak0

Well, I previously opened the config.yaml file but provider and checkpoint were already s0 and mobileclip. Lauching CLIPPyX returns the same error.

Yavuplogu avatar Sep 05 '24 08:09 Yavuplogu