Open Leestronger opened 1 year ago
Try running this:
which c++ export CXX=g++
i use windows and my c++ is
(ground_seg) PS D:\code\python\acupoint_detection\Grounded-Segment-Anything-main> which c++ /c/msys64/ucrt64/bin/c++
try to use C++9 and G++9
I have the same problem...were you able to solve this problem? I am using Ubuntu 22.04
try to use C++9 and G++9
(ground_seg) PS D:\code\python\acupoint_detection\Grounded-Segment-Anything-main> g++ -v
Using built-in specs.
COLLECT_GCC=C:\msys64\ucrt64\bin\g++.exe
COLLECT_LTO_WRAPPER=C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-13.1.0/configure --prefix=/ucrt64 --with-local-prefix=/ucrt64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/ucrt64/include --libexecdir=/ucrt64/lib --enable-bootstrap --enable-checking=release --with-arch=nocona --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-libssp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/ucrt64 --with-mpfr=/ucrt64 --with-mpc=/ucrt64 --with-isl=/ucrt64 --with-pkgversion='Rev5, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.1.0 (Rev5, Built by MSYS2 project)
It seem that my g++ version is higher than G++9
I have the same problem...were you able to solve this problem? I am using Ubuntu 22.04
I meet this question in windows,and I try it again in ubuntu 22.04,this bug doesn't appear again,but when I run python grounded_sam_demo.py
I meet new bug:
‘’‘
/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/torch/functional.py:478: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:2894.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
final text_encoder_type: bert-base-uncased
('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
Traceback (most recent call last):
File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/urllib3/connectionpool.py", line 714, in urlopen
httplib_response = self._make_request(
File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/urllib3/connectionpool.py", line 403, in _make_request
self._validate_conn(conn)
File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1053, in _validate_conn
conn.connect()
File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/urllib3/connection.py", line 419, in connect
self.sock = ssl_wrapsocket(
File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/urllib3/util/ssl.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socketimpl(
File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/urllib3/util/ssl.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/home/lia/anaconda3/envs/sam/lib/python3.8/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/home/lia/anaconda3/envs/sam/lib/python3.8/ssl.py", line 1040, in _create
self.do_handshake()
File "/home/lia/anaconda3/envs/sam/lib/python3.8/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/urllib3/connectionpool.py", line 798, in urlopen retries = retries.increment( File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/urllib3/connectionpool.py", line 714, in urlopen httplib_response = self._make_request( File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/urllib3/connectionpool.py", line 403, in _make_request self._validate_conn(conn) File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1053, in _validate_conn conn.connect() File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/urllib3/connection.py", line 419, in connect self.sock = ssl_wrapsocket( File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/urllib3/util/ssl.py", line 449, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/urllib3/util/ssl.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/home/lia/anaconda3/envs/sam/lib/python3.8/ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "/home/lia/anaconda3/envs/sam/lib/python3.8/ssl.py", line 1040, in _create self.do_handshake() File "/home/lia/anaconda3/envs/sam/lib/python3.8/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/transformers/modeling_utils.py", line 1329, in from_pretrained resolved_archive_file = cached_path( File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/transformers/file_utils.py", line 1776, in cached_path output_path = get_from_cache( File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/transformers/file_utils.py", line 2040, in get_from_cache http_get(url_to_download, temp_file, proxies=proxies, resume_size=resume_size, headers=headers) File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/transformers/file_utils.py", line 1886, in http_get r = requests.get(url, stream=True, proxies=proxies, headers=headers) File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/requests/api.py", line 73, in get return request("get", url, params=params, kwargs) File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, kwargs) File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, kwargs) File "/home/lia/anaconda3/envs/sam/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "grounded_sam_demo.py", line 169, in
'bert-base-uncased' is a correct model identifier listed on 'https://huggingface.co/models' (make sure 'bert-base-uncased' is not a path to a local directory with something else, in that case)
or 'bert-base-uncased' is the correct path to a directory containing a file named one of pytorch_model.bin, tf_model.h5, model.ckpt ‘’‘
try to use C++9 and G++9
(ground_seg) PS D:\code\python\acupoint_detection\Grounded-Segment-Anything-main> g++ -v Using built-in specs. COLLECT_GCC=C:\msys64\ucrt64\bin\g++.exe COLLECT_LTO_WRAPPER=C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../gcc-13.1.0/configure --prefix=/ucrt64 --with-local-prefix=/ucrt64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/ucrt64/include --libexecdir=/ucrt64/lib --enable-bootstrap --enable-checking=release --with-arch=nocona --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-libssp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/ucrt64 --with-mpfr=/ucrt64 --with-mpc=/ucrt64 --with-isl=/ucrt64 --with-pkgversion='Rev5, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++ Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 13.1.0 (Rev5, Built by MSYS2 project)
It seem that my g++ version is higher than G++9
use 9.4.0, must 9.4.0
请问如何解决
Hey, I met this issue but fixed it successfully. Here are some steps I tried that may help:
export CUDA_HOME=/path/to/cuda-11.3/
follow README.md
, and check torch and cuda versions are matched;pip install --no-build-isolation -e GroundingDINO
Hey, I met this issue but fixed it successfully. Here are some steps I tried that may help:
- the previous g++ version is 11.4.0, I re-install the required version 9.4.0;
- export correct path
export CUDA_HOME=/path/to/cuda-11.3/
followREADME.md
, and check torch and cuda versions are matched;pip install --no-build-isolation -e GroundingDINO
How to install the required version 9.4.0, I can't get this version, but only the version 9.5. And it seems not working.
i use windows and my c++ is
(ground_seg) PS D:\code\python\acupoint_detection\Grounded-Segment-Anything-main> which c++ /c/msys64/ucrt64/bin/c++
Hi @Leestronger I have your same problem, but if I run which c++, I get:
"which" is not recognized as an internal or external command, an executable program or a batch file.
1) Any suggestion? 2) Which are your torch, CUDA and Visual Studio version? @yiningsutd @Zhangzhixiang-laugh
i use windows and my c++ is
(ground_seg) PS D:\code\python\acupoint_detection\Grounded-Segment-Anything-main> which c++ /c/msys64/ucrt64/bin/c++
Hi @Leestronger I have your same problem, but if I run which c++, I get:
"which" is not recognized as an internal or external command, an executable program or a batch file.
- Any suggestion?
- Which are your torch, CUDA and Visual Studio version? @yiningsutd @Zhangzhixiang-laugh
windows 10, wsl2: torch=2.3.1 cuda=12.1 cudnn=8.9 g++=9.4.0 gcc=9.4.0 This configuration might work well even with higher versions of g++ and gcc (e.g. 11.x), and that may be also appropriate for you.
@Zhangzhixiang-laugh thanks for your answer, I'm working on windows 11. Do you think is mandatory cudnn to run Grounded-Segment-Anything?
@Zhangzhixiang-laugh thanks for your answer, I'm working on windows 11. Do you think is mandatory cudnn to run Grounded-Segment-Anything?
I don't remember the exact relationship, but it looks like it will involve cuda-level operations. wsl2 will fit you.
`Installing collected packages: groundingdino Running setup.py develop for groundingdino error: subprocess-exited-with-error
error: subprocess-exited-with-error
× python setup.py develop did not run successfully. │ exit code: 1 ╰─> [103 lines of output] fatal: not a git repository (or any of the parent directories): .git Building wheel groundingdino-0.1.0 Compiling with CUDA running develop running egg_info writing groundingdino.egg-info\PKG-INFO writing dependency_links to groundingdino.egg-info\dependency_links.txt writing requirements to groundingdino.egg-info\requires.txt writing top-level names to groundingdino.egg-info\top_level.txt reading manifest file 'groundingdino.egg-info\SOURCES.txt' adding license file 'LICENSE' writing manifest file 'groundingdino.egg-info\SOURCES.txt' running build_ext building 'groundingdino._C' extension Emitting ninja build file D:\code\python\acupoint_detection\Grounded-Segment-Anything-main\GroundingDINO\build\temp.win-amd64-cpython-38\Release\build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) C:\Users\lynnd\Anaconda3\envs\ground_seg\lib\site-packages\setuptools\command\develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated. !!
note: This error originates from a subprocess, and is likely not a problem with pip.`