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

SAM2 is unable to find packages installed on my system. #515

Open
evertvorster opened this issue Jan 2, 2025 · 0 comments
Open

SAM2 is unable to find packages installed on my system. #515

evertvorster opened this issue Jan 2, 2025 · 0 comments

Comments

@evertvorster
Copy link

Hi there!

Hopefully this is an easy one. ;)

When I run python -m build --wheel --no-isolation in the source directory, I get the following output:

==> Starting build()...
Building phase
* Getting build dependencies for wheel...
running egg_info
writing SAM_2.egg-info/PKG-INFO
writing dependency_links to SAM_2.egg-info/dependency_links.txt
writing requirements to SAM_2.egg-info/requires.txt
writing top-level names to SAM_2.egg-info/top_level.txt
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
adding license file 'LICENSE_cctorch'
writing manifest file 'SAM_2.egg-info/SOURCES.txt'

ERROR Missing dependencies:
        torch>=2.5.1
        sympy==1.13.1
==> ERROR: A failure occurred in build().
    Aborting...

This would indicate to me that I have a missing torch and sympy. However, both of these are installed on the system, and of the proper version.

sympy first:

[evert@Evert python-sam2-git]$ yay -Qi python-sympy 
Name            : python-sympy
Version         : 1.13.3-2
Description     : Symbolic manipulation package (Computer Algebra System), written in pure Python
Architecture    : any
URL             : https://sympy.org/en/index.html
Licenses        : BSD
Groups          : None
Provides        : None
Depends On      : python-mpmath
Optional Deps   : ipython: user friendly interface for isympy
                  python-symengine: optimized backend, set USE_SYMENGINE=1 to use
Required By     : python-pytorch-cuda  python-torchvision-cuda
Optional For    : python-fonttools  python-networkx
Conflicts With  : None
Replaces        : None
Installed Size  : 93.30 MiB
Packager        : Jelle van der Waa <[email protected]>
Build Date      : 2024-11-16T22:45:55 CAT
Install Date    : 2024-12-22T18:02:34 CAT
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

It seems to be installed in /usr/lib/python3.13/site-packages:

[evert@Evert python-sam2-git]$ ls /usr/lib/python3.13/site-packages/ | grep sympy
isympy.py
sympy
sympy-1.13.3.dist-info
[evert@Evert python-sam2-git]$ 

torch next:

[evert@Evert python-sam2-git]$ yay -Qi python-pytorch-cuda 
Name            : python-pytorch-cuda
Version         : 2.5.1-7
Description     : Tensors and Dynamic neural networks in Python with strong GPU acceleration (with
                  CUDA)
Architecture    : x86_64
URL             : https://pytorch.org
Licenses        : BSD
Groups          : None
Provides        : python-pytorch=2.5.1
Depends On      : google-glog  gflags  opencv  openmp  openmpi  pybind11  python  python-yaml
                  libuv  python-numpy  python-sympy  protobuf  ffmpeg  qt6-base  eigen
                  intel-oneapi-mkl  python-typing_extensions  numactl  python-jinja
                  python-networkx  python-filelock  cuda  nccl  cudnn  magma-cuda  onednn
Optional Deps   : None
Required By     : python-torchvision-cuda  whisper-git
Optional For    : None
Conflicts With  : python-pytorch
Replaces        : None
Installed Size  : 2.08 GiB
Packager        : Robin Candau <[email protected]>
Build Date      : 2024-12-19T19:16:58 CAT
Install Date    : 2025-01-02T07:57:47 CAT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

This package is also installed in /usr/lib/python3.13/site-packages:

[evert@Evert python-sam2-git]$ ls /usr/lib/python3.13/site-packages/ | grep torch
functorch
torch
torch-2.5.1-py3.13.egg-info
torchgen
torchvision
torchvision-0.20.1a0-py3.13.egg-info

What am I doing wrong here? Are there any switches that I can set so that sam2 finds the installed packages?

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

1 participant