Pip install inference[transformers] has conflicts because of torch 2.4.0

I’m trying to install support for OWLv2 using pip install inference[transformers] as I’d like to use a Roboflow instant model with InferencePipeline.

During the install it installs torch 2.4.0 (and if I have a more recent version, it’ll uninstall that)

But at the end of the install I get this error because ultralytics 8.3.40 doesn’t support torch 2.4.0:

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.
ultralytics 8.3.40 requires torch!=2.4.0,>=1.8.0; sys_platform == “win32”, but you have torch 2.4.0 which is incompatible.

Hi @LouNL ,

I tried to install inference[transformers] and encountered no errors.

Here is what I did:

echo "inference[transformers]" > requirements.txt
python3.12 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

The process completes without error.

I see you already have some packages installed. Can you share more details about your setup? I guess you have requirements.txt (or equivalent) in your project, it would help if you can share.

Thanks!
Grzegorz

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.