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

fail to install GroundingDINO #412

Open
fiy-fiy opened this issue Dec 6, 2023 · 5 comments
Open

fail to install GroundingDINO #412

fiy-fiy opened this issue Dec 6, 2023 · 5 comments

Comments

@fiy-fiy
Copy link

fiy-fiy commented Dec 6, 2023

ollecting mpmath>=0.19 (from sympy->torch->groundingdino==0.1.0)
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl (536 kB)
Collecting six>=1.5 (from python-dateutil>=2.7->matplotlib>=2.1.0->pycocotools->groundingdino==0.1.0)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: groundingdino
Building editable for groundingdino (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building editable for groundingdino (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [135 lines of output]
/tmp/pip-build-env-365dpgjs/overlay/lib/python3.11/site-packages/torch/nn/modules/transformer.py:20: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at ../torch/csrc/utils/tensor_numpy.cpp:84.)
device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'),
Building wheel groundingdino-0.1.0
Compiling with CUDA
running editable_wheel
creating /tmp/pip-wheel-jyr6d1fl/.tmp-yzt0daed/groundingdino.egg-info
writing /tmp/pip-wheel-jyr6d1fl/.tmp-yzt0daed/groundingdino.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-wheel-jyr6d1fl/.tmp-yzt0daed/groundingdino.egg-info/dependency_links.txt
writing requirements to /tmp/pip-wheel-jyr6d1fl/.tmp-yzt0daed/groundingdino.egg-info/requires.txt
writing top-level names to /tmp/pip-wheel-jyr6d1fl/.tmp-yzt0daed/groundingdino.egg-info/top_level.txt
writing manifest file '/tmp/pip-wheel-jyr6d1fl/.tmp-yzt0daed/groundingdino.egg-info/SOURCES.txt'
/tmp/pip-build-env-365dpgjs/overlay/lib/python3.11/site-packages/torch/utils/cpp_extension.py:502: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
reading manifest file '/tmp/pip-wheel-jyr6d1fl/.tmp-yzt0daed/groundingdino.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file '/tmp/pip-wheel-jyr6d1fl/.tmp-yzt0daed/groundingdino.egg-info/SOURCES.txt'
creating '/tmp/pip-wheel-jyr6d1fl/.tmp-yzt0daed/groundingdino-0.1.0.dist-info'
creating /tmp/pip-wheel-jyr6d1fl/.tmp-yzt0daed/groundingdino-0.1.0.dist-info/WHEEL
running build_py
running build_ext
Traceback (most recent call last):
File "/tmp/pip-build-env-365dpgjs/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 156, in run
self._create_wheel_file(bdist_wheel)
File "/tmp/pip-build-env-365dpgjs/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 345, in _create_wheel_file
files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-365dpgjs/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 268, in _run_build_commands
self._run_build_subcommands()
File "/tmp/pip-build-env-365dpgjs/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 295, in _run_build_subcommands
self.run_command(name)
File "/tmp/pip-build-env-365dpgjs/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-365dpgjs/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 963, in run_command
super().run_command(command)
File "/tmp/pip-build-env-365dpgjs/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-365dpgjs/overlay/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 88, in run
_build_ext.run(self)
File "/tmp/pip-build-env-365dpgjs/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
self.build_extensions()
File "/tmp/pip-build-env-365dpgjs/overlay/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 525, in build_extensions
_check_cuda_version(compiler_name, compiler_version)
File "/tmp/pip-build-env-365dpgjs/overlay/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 413, in _check_cuda_version
raise RuntimeError(CUDA_MISMATCH_MESSAGE.format(cuda_str_version, torch.version.cuda))
RuntimeError:
The detected CUDA version (11.3) mismatches the version that was used to compile
PyTorch (12.1). Please make sure to use the same CUDA versions.

@rentainhe
Copy link
Collaborator

The detected CUDA version (11.3) mismatches the version that was used to compile
PyTorch (12.1). Please make sure to use the same CUDA versions.

It seems like there're something wrong with PyTorch installation

@fiy-fiy
Copy link
Author

fiy-fiy commented Dec 6, 2023

The detected CUDA version (11.3) mismatches the version that was used to compile
PyTorch (12.1). Please make sure to use the same CUDA versions.

It seems like there're something wrong with PyTorch installation

I used the "pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113" install torch and cu113

@roboav8r
Copy link

Got a similar message to @fiy-fiy above, except with CUDA 11.8 in my conda environment. Happy to share more info if you would like.

@ybgdgh
Copy link

ybgdgh commented Jan 1, 2024

I think you can try to delete the pyproject.toml since the building system was using a different Pytorch version from pyproject.toml, that works for me.
refer to this comment

@fiy-fiy
Copy link
Author

fiy-fiy commented Jan 12, 2024

I have successfully installed GrouningDino by this #229 (comment)
you can try it

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

4 participants