Skip to content

"Disabling PyTorch because PyTorch >= 2.1 is required but found 1.12.1+cu113" leads to errors in YOLOWorld instantiation #26

@paulo-cortesao

Description

@paulo-cortesao

Thank you for your research.

I am working on a Ubuntu 24.04 machine, which originally supports CUDA 12.8 and gcc-13. The python version in my environment is 3.10.9. For the purpose of installing this software, I installed CUDA 11.3, gcc-9 and g++-9, appropriately setting the CXX and CUDA_HOME variables before installation, and using the linux-5.4-headers in the setup of MinkowskiEngine.

I used a slightly different command for installing torch-scatter since the version given by the link was incorrect: pip3 install torch-scatter==2.1.0 -f https://data.pyg.org/whl/torch-1.12.1+cu113.html

I also explicitly installed numpy==1.26.4 to avoid errors in the installation of mmcv==2.0.0 and other packages.

After following the installation instructions up until Pointnet2, installing pytorch-lightning==1.7.2 makes pip remove the existing installation of torch==1.12.1 and replace it with torch==2.7.1. YOLO-World also explicitly requires torch>=2.1.0.

Finishing all the steps, I tried to run the single_scene_inference.py file without arguments but torch is explicitly deactivated in the beginning of the program:

Disabling PyTorch because PyTorch >= 2.1 is required but found 1.12.1+cu113
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.

As such, instantiating the YOLOWorld class (more precisely, initializing network_2d) leads to this error:

CLIPTextModelWithProjection requires the PyTorch library but it was not found in your environment. 
Check out the instructions on the installation page: https://pytorch.org/get-started/locally/ and follow the ones that match your environment. 
Please note that you may need to restart your runtime after installation.

How can I correct this error? Do you use a different python version? Is there any detail of the setup that I might have missed?

I appreciate your time and attention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions