Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'clip' has no attribute 'load' #329

Open
nitrocon opened this issue Feb 22, 2023 · 4 comments
Open

'clip' has no attribute 'load' #329

nitrocon opened this issue Feb 22, 2023 · 4 comments

Comments

@nitrocon
Copy link

nitrocon commented Feb 22, 2023

hi, I am quite new to python but I installed pytorch in a enviroment from python 309, using powershell in win10

I did not edit youre example code from the git page, even wothout any image in the folder this happens
this is the error I get when performing the code:

Traceback (most recent call last):
File "D:\Arbeitszimmer\Projekte\Tensorflow\CLIP\myclip.py", line 7, in
model, preprocess = clip.load("ViT-B/32", device=device)
AttributeError: module 'clip' has no attribute 'load'

pip list:
Package Version


certifi 2022.12.7
charset-normalizer 3.0.1
clip 0.2.0
idna 3.4
numpy 1.24.2
Pillow 9.4.0
pip 23.0.1
requests 2.28.2
setuptools 49.2.1
torch 1.7.1+cu110
typing_extensions 4.5.0
urllib3 1.26.14

missing torchaudio and torchvision (???)

@Rijgersberg
Copy link

You probably accidentally installed the clip package from PyPI, a package entirely unrelated to OpenAI CLIP: "Clip is a command-line interface (CLI) tool that allows you to store and quickly access text snippets and manage your clipboard."

To remove it, type pip uninstall clip.

Then follow the installation instructions in the README to install OpenAI's CLIP.

@nitrocon
Copy link
Author

oh man, we have to train chatGPT then :D :D
So how do I install clip then?

Thanks for youre answer!

@bartbroere
Copy link

You're probably looking for this line from the README:

pip install git+https://github.com/openai/CLIP.git

@nitrocon
Copy link
Author

got it, thanks for this...its a hard way to got until you have the first model :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants