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

Do you think you'll ever migrate your code to the latest stable versions of mmcv and mmdetection? #7

Closed
nbkn865 opened this issue Mar 3, 2023 · 13 comments

Comments

@nbkn865
Copy link

nbkn865 commented Mar 3, 2023

I closed out my other issue because I couldn't get the repo to work because of the old code, so was wondering/hoping if you plan to bring your code up to date with the latest mmcv and mmdetection packages

@sandipan211
Copy link
Owner

sandipan211 commented Mar 5, 2023

Hi,

I re-implemented the code with a newer CUDA without the need for changing the mmcv and mmdetection versions. I tried this code on an NVIDIA A100-SXM4-80GB with CUDA 11.6, building the entire code environment from scratch as follows:

conda create --name zsd_scratch python=3.7.3
conda activate zsd_scratch
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.6 -c pytorch -c conda-forge
conda install -c conda-forge cudatoolkit-dev 

Then pip run a requirements.txt file with the following content:

      - addict==2.2.1
      - albumentations==1.3.0
      - certifi==2022.9.24
      - cycler==0.11.0
      - cython==0.29.6
      - h5py==3.8.0
      - imagecorruptions==1.1.2
      - imageio==2.22.4
      - joblib==1.2.0
      - kiwisolver==1.4.4
      - matplotlib==3.0.3
      - mmcv==0.2.10
      - networkx==2.6.3
      - opencv-python==4.6.0.66
      - opencv-python-headless==4.6.0.66
      - pandas==1.3.5
      - pillow==9.3.0
      - pycocotools==2.0.6
      - pyparsing==3.0.9
      - python-dateutil==2.8.2
      - pytz==2022.6
      - pywavelets==1.3.0
      - pyyaml==6.0
      - qudida==0.0.4
      - scikit-image==0.16.1
      - scikit-learn==0.20.3
      - scipy==1.7.3
      - seaborn==0.9.0
      - terminaltables==3.1.10
      - threadpoolctl==3.1.0
      - tqdm==4.64.1

After cudatoolkit-dev completes executing, run which nvcc. My output was: /workspace/arijit_pg/anaconda3/envs/zsd_scratch/bin/nvcc

Set your CUDA_HOME variable as:

export CUDA_HOME=/workspace/arijit_pg/anaconda3/envs/zsd_scratch

This was the minimal setup using which I was able to run with latest CUDA versions, without changing the mmcv and mmdetection versions.

Hope this helps you.

@nbkn865
Copy link
Author

nbkn865 commented Mar 8, 2023

Thanks, I was able to get further this time, but encountered problems when I tried to run python setup.py develop to build mmdetect, where I got a lot of deprecation and other warnings, especially as the various .cpp code tried to build, and eventually I got a gcc compile failure.

Did you also get a whole list of warnings when you built yours?

These are my gcc and nvcc versions, not sure what other tools I need to sync up (or if the gcc version matters at all, but I'm sure the nvcc version does matter):

gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

Cuda compilation tools, release 11.6, V11.6.55
Build cuda_11.6.r11.6/compiler.30794723_0

@sandipan211
Copy link
Owner

sandipan211 commented Mar 10, 2023

Yes @nbkn865 I also got several warnings like you said, but it was able to build successfully. As far as I remember, I also got some GCC-related warnings but I think gcc > 7 should work. This is the output of my collect_env:

(zsd_scratch) arijit_pg@717563b97532:~/sushil/zsd/script$ python3 -m torch.utils.collect_env
Collecting environment information...
PyTorch version: 1.12.1
Is debug build: False
CUDA used to build PyTorch: 11.6
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.5 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-6ubuntu2) 7.5.0
Clang version: Could not collect

The nvcc version looks like:

(zsd_scratch) arijit_pg@717563b97532:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Wed_Jun__2_19:15:15_PDT_2021
Cuda compilation tools, release 11.4, V11.4.48
Build cuda_11.4.r11.4/compiler.30033411_0

In this environment, my code does run. If it still doesn't work, I'm sure you will find something on StackOverflow. I also did the last time I ran but haven't bookmarked the link to how I did it. But yes, gcc-related issue was solved once I took in GCC-7.

@nbkn865
Copy link
Author

nbkn865 commented Mar 10, 2023

That's interesting, you used CUDA 11.4 for nvcc but loaded CUDA 11.6 for Torch: torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.6, but I guess it still worked.

Let me try that CUDA version as well

@nbkn865
Copy link
Author

nbkn865 commented Mar 10, 2023

Actually, can you share the full printout of python3 -m torch.utils.collect_env?

Mine is:

PyTorch version: 1.12.1
Is debug build: False
CUDA used to build PyTorch: 11.6
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.5 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.10

Python version: 3.7.3 | packaged by conda-forge | (default, Dec  6 2019, 08:54:18)  [GCC 7.3.0] (64-bit runtime)
Python platform: Linux-5.15.0-67-generic-x86_64-with-debian-bullseye-sid
Is CUDA available: True
CUDA runtime version: 10.1.243
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3090
Nvidia driver version: 530.30.02
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.3.2
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.3.2
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.3.2
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.3.2
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.3.2
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.3.2
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.3.2
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.21.6
[pip3] torch==1.12.1
[pip3] torchaudio==0.12.1
[pip3] torchvision==0.13.1
[conda] blas                      2.116                       mkl    conda-forge
[conda] blas-devel                3.9.0            16_linux64_mkl    conda-forge
[conda] cudatoolkit               11.6.0              hecad31d_11    conda-forge
[conda] ffmpeg                    4.3                  hf484d3e_0    pytorch
[conda] libblas                   3.9.0            16_linux64_mkl    conda-forge
[conda] libcblas                  3.9.0            16_linux64_mkl    conda-forge
[conda] liblapack                 3.9.0            16_linux64_mkl    conda-forge
[conda] liblapacke                3.9.0            16_linux64_mkl    conda-forge
[conda] mkl                       2022.1.0           h84fe81f_915    conda-forge
[conda] mkl-devel                 2022.1.0           ha770c72_916    conda-forge
[conda] mkl-include               2022.1.0           h84fe81f_915    conda-forge
[conda] numpy                     1.21.6           py37h976b520_0    conda-forge
[conda] pytorch                   1.12.1          py3.7_cuda11.6_cudnn8.3.2_0    pytorch
[conda] pytorch-mutex             1.0                        cuda    pytorch
[conda] torchaudio                0.12.1               py37_cu116    pytorch
[conda] torchvision               0.13.1               py37_cu116    pytorch```

@nbkn865
Copy link
Author

nbkn865 commented Mar 10, 2023

What's interesting is that the CUDA runtime is CUDA runtime version: 10.1.243

But shouldn't conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.6 -c pytorch -c conda-forge install the 11.6 runtime?

I think if you can share your collect_env printout, I can try to figure out how to replicate it as close as possible, and hopefully I can get your repo to work

@sandipan211
Copy link
Owner

sandipan211 commented Mar 14, 2023

That's interesting, you used CUDA 11.4 for nvcc but loaded CUDA 11.6 for Torch: torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.6, but I guess it still worked.

Let me try that CUDA version as well

The NVIDIA A100 I am using comes with CUDA 11.4. Moreover, when I install cudatoolkit-dev, by default it gives me cudatoolkit-dev 11.4. That is why my nvcc has CUDA 11.4. However, I could not find cudatoolkit=11.4 for any pytorch version on PyTorch website, hence went with 11.6 for cudatoolkit.

Are you sure you have installed cudatoolkit-dev? I think if you do install, then your cuda runtime version will be set to 11.4 like mine. Here is my complete output of collect_env for your reference:

(zsd_scratch) arijit_pg@717563b97532:~$ python3 -m torch.utils.collect_env
Collecting environment information...
PyTorch version: 1.12.1
Is debug build: False
CUDA used to build PyTorch: 11.6
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.5 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-6ubuntu2) 7.5.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.10

Python version: 3.7.3 (default, Mar 27 2019, 22:11:17)  [GCC 7.3.0] (64-bit runtime)
Python platform: Linux-5.15.0-56-generic-x86_64-with-debian-bullseye-sid
Is CUDA available: True
CUDA runtime version: 11.4.48
GPU models and configuration: GPU 0: NVIDIA A100-SXM4-40GB
Nvidia driver version: 510.108.03
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.21.5
[pip3] torch==1.12.1
[pip3] torchaudio==0.12.1
[pip3] torchvision==0.13.1
[conda] blas                      1.0                         mkl
[conda] cudatoolkit               11.6.0              hecad31d_10    conda-forge
[conda] cudatoolkit-dev           11.4.0               h5764c6d_5    conda-forge
[conda] ffmpeg                    4.3                  hf484d3e_0    pytorch
[conda] mkl                       2021.4.0           h06a4308_640
[conda] mkl-service               2.4.0            py37h402132d_0    conda-forge
[conda] mkl_fft                   1.3.1            py37h3e078e5_1    conda-forge
[conda] mkl_random                1.2.2            py37h219a48f_0    conda-forge
[conda] numpy                     1.21.5           py37h6c91a56_3
[conda] numpy-base                1.21.5           py37ha15fc14_3
[conda] pytorch                   1.12.1          py3.7_cuda11.6_cudnn8.3.2_0    pytorch
[conda] pytorch-mutex             1.0                        cuda    pytorch
[conda] torchaudio                0.12.1               py37_cu116    pytorch
[conda] torchvision               0.13.1               py37_cu116    pytorch

NOTE: a couple library versions like numpy might have been upgraded/downgraded in this since I have made some changes to my conda environment for another work.

@sqdcbbj
Copy link

sqdcbbj commented Jan 16, 2024

Hi, I used the torch1.12.1 cuda11.6 but got the erro: Traceback (most recent call last):
File "tools/zero_shot_utils.py", line 3, in
from mmdet.datasets import DATASETS, build_dataloader
File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/datasets/init.py", line 2, in
from .cityscapes import CityscapesDataset
File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/datasets/cityscapes.py", line 1, in
from .coco import CocoDataset
File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/datasets/coco.py", line 4, in
from .custom import CustomDataset
File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/datasets/custom.py", line 7, in
from .pipelines import Compose
File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/datasets/pipelines/init.py", line 6, in
from .transforms import (Albu, Expand, MinIoURandomCrop, Normalize, Pad,
File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/datasets/pipelines/transforms.py", line 10, in
from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps
File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/core/init.py", line 6, in
from .post_processing import * # noqa: F401, F403
File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/core/post_processing/init.py", line 1, in
from .bbox_nms import multiclass_nms
File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/core/post_processing/bbox_nms.py", line 3, in
from mmdet.ops.nms import nms_wrapper
File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/ops/init.py", line 2, in
from .dcn import (DeformConv, DeformConvPack, DeformRoIPooling,
File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/ops/dcn/init.py", line 1, in
from .deform_conv import (DeformConv, DeformConvPack, ModulatedDeformConv,
File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/ops/dcn/deform_conv.py", line 9, in
from . import deform_conv_cuda
ImportError: libcudart.so.9.0: cannot open shared object file: No such file or directory
could you help me solve it , thanks!

@sandipan211
Copy link
Owner

sandipan211 commented Jan 16, 2024

Hi, I used the torch1.12.1 cuda11.6 but got the erro: Traceback (most recent call last): File "tools/zero_shot_utils.py", line 3, in from mmdet.datasets import DATASETS, build_dataloader File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/datasets/init.py", line 2, in from .cityscapes import CityscapesDataset File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/datasets/cityscapes.py", line 1, in from .coco import CocoDataset File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/datasets/coco.py", line 4, in from .custom import CustomDataset File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/datasets/custom.py", line 7, in from .pipelines import Compose File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/datasets/pipelines/init.py", line 6, in from .transforms import (Albu, Expand, MinIoURandomCrop, Normalize, Pad, File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/datasets/pipelines/transforms.py", line 10, in from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/core/init.py", line 6, in from .post_processing import * # noqa: F401, F403 File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/core/post_processing/init.py", line 1, in from .bbox_nms import multiclass_nms File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/core/post_processing/bbox_nms.py", line 3, in from mmdet.ops.nms import nms_wrapper File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/ops/init.py", line 2, in from .dcn import (DeformConv, DeformConvPack, DeformRoIPooling, File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/ops/dcn/init.py", line 1, in from .deform_conv import (DeformConv, DeformConvPack, ModulatedDeformConv, File "/home/dell/exp/qcx/ZSD-SC-Resolver-main/mmdetection/mmdet/ops/dcn/deform_conv.py", line 9, in from . import deform_conv_cuda ImportError: libcudart.so.9.0: cannot open shared object file: No such file or directory could you help me solve it , thanks!

Hi,

Can you tell me more specifically about your environment settings and the output of nvcc --version. Moreover, can you also mention your GPU details?

@sandipan211 sandipan211 reopened this Jan 16, 2024
@sqdcbbj
Copy link

sqdcbbj commented Jan 17, 2024

My environment settings are as follows:nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0

packages in environment at /home/dell/anaconda3/envs/zsd_scratch:

Name Version Build Channel

_libgcc_mutex 0.1 main defaults
_openmp_mutex 5.1 1_gnu defaults
addict 2.4.0 pypi_0 pypi
albumentations 1.3.1 pypi_0 pypi
aliyun-python-sdk-core 2.14.0 pypi_0 pypi
aliyun-python-sdk-kms 2.16.2 pypi_0 pypi
ca-certificates 2023.12.12 h06a4308_0 defaults
certifi 2022.12.7 py37h06a4308_0 defaults
cffi 1.15.1 pypi_0 pypi
charset-normalizer 3.3.2 pypi_0 pypi
click 8.1.7 pypi_0 pypi
colorama 0.4.6 pypi_0 pypi
crcmod 1.7 pypi_0 pypi
cryptography 41.0.7 pypi_0 pypi
cudatoolkit 9.0 h13b8566_0 defaults
cycler 0.11.0 pypi_0 pypi
cython 0.29.6 pypi_0 pypi
idna 3.6 pypi_0 pypi
imagecorruptions 1.1.2 pypi_0 pypi
imageio 2.31.2 pypi_0 pypi
importlib-metadata 6.7.0 pypi_0 pypi
jmespath 0.10.0 pypi_0 pypi
joblib 1.3.2 pypi_0 pypi
kiwisolver 1.4.5 pypi_0 pypi
libedit 3.1.20230828 h5eee18b_0 defaults
libffi 3.2.1 hf484d3e_1007 defaults
libgcc-ng 11.2.0 h1234567_1 defaults
libgomp 11.2.0 h1234567_1 defaults
libstdcxx-ng 11.2.0 h1234567_1 defaults
markdown 3.4.4 pypi_0 pypi
markdown-it-py 2.2.0 pypi_0 pypi
matplotlib 3.0.3 pypi_0 pypi
mdurl 0.1.2 pypi_0 pypi
mmcv 0.2.10 pypi_0 pypi
mmdet 1.0rc0+1c9afec dev_0
model-index 0.1.11 pypi_0 pypi
ncurses 6.4 h6a678d5_0 defaults
networkx 2.6.3 pypi_0 pypi
numpy 1.21.6 pypi_0 pypi
opencv-python 4.9.0.80 pypi_0 pypi
opencv-python-headless 4.6.0.66 pypi_0 pypi
opendatalab 0.0.10 pypi_0 pypi
openmim 0.3.9 pypi_0 pypi
openssl 1.1.1w h7f8727e_0 defaults
openxlab 0.0.10 pypi_0 pypi
ordered-set 4.1.0 pypi_0 pypi
oss2 2.17.0 pypi_0 pypi
packaging 23.2 pypi_0 pypi
pandas 1.3.5 pypi_0 pypi
pillow 9.5.0 pypi_0 pypi
pip 22.3.1 py37h06a4308_0 defaults
pycocotools 2.0.7 pypi_0 pypi
pycparser 2.21 pypi_0 pypi
pycryptodome 3.20.0 pypi_0 pypi
pygments 2.17.2 pypi_0 pypi
pyparsing 3.1.1 pypi_0 pypi
python 3.7.3 h0371630_0 defaults
python-dateutil 2.8.2 pypi_0 pypi
pytz 2023.3.post1 pypi_0 pypi
pywavelets 1.3.0 pypi_0 pypi
pyyaml 6.0.1 pypi_0 pypi
qudida 0.0.4 pypi_0 pypi
readline 7.0 h7b6447c_5 defaults
requests 2.28.2 pypi_0 pypi
rich 13.7.0 pypi_0 pypi
scikit-image 0.19.3 pypi_0 pypi
scikit-learn 1.0.2 pypi_0 pypi
scipy 1.7.3 pypi_0 pypi
setuptools 60.2.0 pypi_0 pypi
six 1.16.0 pypi_0 pypi
sqlite 3.33.0 h62c20be_0 defaults
tabulate 0.9.0 pypi_0 pypi
terminaltables 3.1.10 pypi_0 pypi
threadpoolctl 3.1.0 pypi_0 pypi
tifffile 2021.11.2 pypi_0 pypi
tk 8.6.12 h1ccaba5_0 defaults
torch 1.12.1+cu116 pypi_0 pypi
torchaudio 0.12.1 pypi_0 pypi
torchvision 0.13.1 pypi_0 pypi
tqdm 4.65.2 pypi_0 pypi
typing-extensions 4.7.1 pypi_0 pypi
urllib3 1.26.18 pypi_0 pypi
wheel 0.38.4 py37h06a4308_0 defaults
xz 5.4.5 h5eee18b_0 defaults
zipp 3.15.0 pypi_0 pypi
and my gpu is A6000.
Thanks!

@sandipan211
Copy link
Owner

sandipan211 commented Jan 20, 2024

My environment settings are as follows:nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2021 NVIDIA Corporation Built on Thu_Nov_18_09:45:30_PST_2021 Cuda compilation tools, release 11.5, V11.5.119 Build cuda_11.5.r11.5/compiler.30672275_0

packages in environment at /home/dell/anaconda3/envs/zsd_scratch:

Name Version Build Channel

_libgcc_mutex 0.1 main defaults _openmp_mutex 5.1 1_gnu defaults addict 2.4.0 pypi_0 pypi albumentations 1.3.1 pypi_0 pypi aliyun-python-sdk-core 2.14.0 pypi_0 pypi aliyun-python-sdk-kms 2.16.2 pypi_0 pypi ca-certificates 2023.12.12 h06a4308_0 defaults certifi 2022.12.7 py37h06a4308_0 defaults cffi 1.15.1 pypi_0 pypi charset-normalizer 3.3.2 pypi_0 pypi click 8.1.7 pypi_0 pypi colorama 0.4.6 pypi_0 pypi crcmod 1.7 pypi_0 pypi cryptography 41.0.7 pypi_0 pypi cudatoolkit 9.0 h13b8566_0 defaults cycler 0.11.0 pypi_0 pypi cython 0.29.6 pypi_0 pypi idna 3.6 pypi_0 pypi imagecorruptions 1.1.2 pypi_0 pypi imageio 2.31.2 pypi_0 pypi importlib-metadata 6.7.0 pypi_0 pypi jmespath 0.10.0 pypi_0 pypi joblib 1.3.2 pypi_0 pypi kiwisolver 1.4.5 pypi_0 pypi libedit 3.1.20230828 h5eee18b_0 defaults libffi 3.2.1 hf484d3e_1007 defaults libgcc-ng 11.2.0 h1234567_1 defaults libgomp 11.2.0 h1234567_1 defaults libstdcxx-ng 11.2.0 h1234567_1 defaults markdown 3.4.4 pypi_0 pypi markdown-it-py 2.2.0 pypi_0 pypi matplotlib 3.0.3 pypi_0 pypi mdurl 0.1.2 pypi_0 pypi mmcv 0.2.10 pypi_0 pypi mmdet 1.0rc0+1c9afec dev_0 model-index 0.1.11 pypi_0 pypi ncurses 6.4 h6a678d5_0 defaults networkx 2.6.3 pypi_0 pypi numpy 1.21.6 pypi_0 pypi opencv-python 4.9.0.80 pypi_0 pypi opencv-python-headless 4.6.0.66 pypi_0 pypi opendatalab 0.0.10 pypi_0 pypi openmim 0.3.9 pypi_0 pypi openssl 1.1.1w h7f8727e_0 defaults openxlab 0.0.10 pypi_0 pypi ordered-set 4.1.0 pypi_0 pypi oss2 2.17.0 pypi_0 pypi packaging 23.2 pypi_0 pypi pandas 1.3.5 pypi_0 pypi pillow 9.5.0 pypi_0 pypi pip 22.3.1 py37h06a4308_0 defaults pycocotools 2.0.7 pypi_0 pypi pycparser 2.21 pypi_0 pypi pycryptodome 3.20.0 pypi_0 pypi pygments 2.17.2 pypi_0 pypi pyparsing 3.1.1 pypi_0 pypi python 3.7.3 h0371630_0 defaults python-dateutil 2.8.2 pypi_0 pypi pytz 2023.3.post1 pypi_0 pypi pywavelets 1.3.0 pypi_0 pypi pyyaml 6.0.1 pypi_0 pypi qudida 0.0.4 pypi_0 pypi readline 7.0 h7b6447c_5 defaults requests 2.28.2 pypi_0 pypi rich 13.7.0 pypi_0 pypi scikit-image 0.19.3 pypi_0 pypi scikit-learn 1.0.2 pypi_0 pypi scipy 1.7.3 pypi_0 pypi setuptools 60.2.0 pypi_0 pypi six 1.16.0 pypi_0 pypi sqlite 3.33.0 h62c20be_0 defaults tabulate 0.9.0 pypi_0 pypi terminaltables 3.1.10 pypi_0 pypi threadpoolctl 3.1.0 pypi_0 pypi tifffile 2021.11.2 pypi_0 pypi tk 8.6.12 h1ccaba5_0 defaults torch 1.12.1+cu116 pypi_0 pypi torchaudio 0.12.1 pypi_0 pypi torchvision 0.13.1 pypi_0 pypi tqdm 4.65.2 pypi_0 pypi typing-extensions 4.7.1 pypi_0 pypi urllib3 1.26.18 pypi_0 pypi wheel 0.38.4 py37h06a4308_0 defaults xz 5.4.5 h5eee18b_0 defaults zipp 3.15.0 pypi_0 pypi and my gpu is A6000. Thanks!

@sqdcbbj Looks like there are some dependency issues since your nvcc has CUDA 11.5 but your environment contains cudatoolkit 9.0. You can try upgrading this by installing the cudatoolkit 11.x runtime following the steps given here.

@lichong0
Copy link

When executing this code, I encountered some problems {conda install - c conda forge cudatoolkit dev}
ERROR conda. core. link: _execute (740): An error occurred while installing the package "conda forge:: cudatoolkit-dev-11.7.0-h9f2f4db_6".
Rollback transaction: complete
Class: LinkError
Message:
The post link script of the software package conda forge:: cudatoolkit-dev-11.7.0-h9f2f4db_6 failed
Location of the failed script: F: Anaconda envs zsd Scripts.cudatoolkit-dev-post-link.bat
==>Script Message<==

==>Script Output<==
stdout:
7-Zip (a) 19.00 (x64): Copyright (c) 1999-2018 Igor Pavlov: 2019-02-21
Scan the drive for files:
1 file, 0 bytes
Extract file: F: Anaconda envs zsd pkgs cudatoolkit dev cuda_11.7.0_516.01_windows.exe
Cannot open as file: 1
File: 0
Size: 0
Compression: 0
Running post installation
Reuse the previously downloaded F: Anaconda envs zsd pkgs cudatoolkit dev cuda_11.7.0_516.01_windows.exe
Uncompress on Windows

Stderr:% Total% Received% Xferd Average Speed Time Time Current
Total remaining speed of Dload upload
0 0 0 0 0 0 0 0--: --: --: --: --0
Error: F: Anaconda envs zsd pkgs cudatoolkit dev cuda_11.7.0_516.01_windows.exe
Cannot open file as archive

F: Anaconda envs zsd bin cudatoolkit dev post install. py: 281: DeprecationWarning: distutils version class is deprecated. Please use packaging.version instead.
If LooseVersion (cudatoolkit ["version"])>=LooseVersion ('11.6.0 '):
Traceback (last call last time):
File "F: Anaconda envs zsd bin cudatoolkit dev post install. py", line 311, in
_In main()
File "F: Anaconda envs zsd bin cudatoolkit dev post install. py", line 307, in _main
Extractor. extract()
The file "F: Anaconda envs zsd bin cudatoolkit dev post install. py", line 181, is in the extraction sub process.
Run (cmd, env=os. environment. copy(), check=True)
File "F: Anaconda envs zsd lib subprocess. py", line 487, when running
Output=stdout, stderr=stderr)
Subprocess.CalledProcessError: The command '['7za', 'x', 'F: Anaconda envs zsd pkgs cudatoolkit dev cuda_11.7.0_516.01_windows. exe', '- oc: Users dell AppData Local Temp tmp135hdu3w'] 'returns non-zero exit status 2.
Return code: 1
kwargs:
{}
Backtracking (last call last call):
File "F: Anaconda lib site packages conda exceptions.py", line 1132, after calling
Return func (* args, * * kwargs)
File "F: Anaconda lib site packages conda cli main. py", line 69, in main_subshel l
Exit_code=do_call (args, p)
File "F: Anaconda lib site packages conda cli conda_argparse. py", line 122, in do_call
Return getattr (module, func_name) (args, parser)
File "F: Anaconda lib site packages conda notices core. py", line 121, in the wrapper
Return func (* args, * * kwargs)
File "F: Anaconda lib site packages conda cli main_install. py", line 20, execute
Installation (args, parser,'install')
File "F: Anaconda lib site packages conda cli install. py", line 334, after installing
Handle_txn (unlink_link_transaction, prefix,args,newenv)
File "F: Anaconda lib site packages conda cli install. py", line 363, in handle_txn
Unlink_link_transaction. execute()
File "F: Anaconda lib site packages conda core link. py", line 283, in execution
Self. _execute (tuple (chain (* chain (* zip (* self. prefix_action_groups. values())))))
File "F: Anaconda lib site packages conda core link. py", line 756, in execution
Throwing CondaMultiError(
conda.CondaMultiErrorclass: LinkError
Message:
The post link script of package conda forge:: cudatoolkit-dev-11.7.0-h9f2f4db_6 failed
The location of the failed script: F: Anaconda envs zsd Scripts.cudatoolkit dev post link. bat
==>Script Message<==

==>Script Output<==
stdout:
7-Zip (a) 19.00 (x64): Copyright (c) 1999-2018 Igor Pavlov: 2019-02-21
Scanning drive for files:
1 file, 0 bytes
Extracting file: F: Anaconda envs zsd pkgs cudatoolkit dev cuda_11.7.0_516.01_windows.exe
Cannot open as file: 1
File: 0
Size: 0
Compression: 0
Running post installation
Reuse the previously downloaded F: Anaconda envs zsd pkgs cudatoolkit dev cuda_11.7.0_516.01_windows.exe
Extract on Windows
Stderr:% Total% Received% Xferd Average Speed Time Time Current
Total remaining speed of Dload upload
0 0 0 0 0 0 0--: --: --: --: --: --: -- --0
Error: F: Anaconda envs zsd pkgs cudatoolkit dev cuda_11.7.0_516.01_windows.exe
Cannot open file as archive
F: Anaconda envs zsd bin cudatoolkit dev post install. py: 281: DeprecationWarning: distutils version class is deprecated. Please use packaging.version instead.
If LooseVersion (cudatoolkit ["version"])>=LooseVersion ('11.6.0 '):
Backtracking (last call last call):
File "F: Anaconda envs zsd bin cudatoolkit dev post install. py", line 311, in
In main()
File "F: Anaconda envs zsd bin cudatoolkit dev post install. py", line 307, in the main
Extractor. extract()
File "F: Anaconda envs zsd bin cudatoolkit dev post install. py", line 181, in the extract sub
In process. Run (cmd, env=os. environment. copy(), check=True)
File "F: Anaconda envs zsd lib subprocess. py", line 487, when running
Output=stdout, stderr=stderr) sub
Process. CalledProcessError: The command '['7za', 'x', 'F: Anaconda envs zsd pkgs cudatoolkit dev cuda_11.7.0_516.01_windows. exe', '- oc: Users dell AppData Local Temp tmp135hdu3w'] 'returns non-zero exit status 2.
Return code: 1
kwargs:
{}
:<exception str() failed>
During the processing of the above exception, another exception occurred:
Backtracking (last call last call):
File "F: Anaconda Scripts conda script. py", line 12, in
Sys. exit (main())
File "F: Anaconda lib site packages conda cli main. py", line 112, in the main
Return conda_exception_handler (main, * args, * * kwargs)
File "F: Anaconda lib site packages conda exceptions. py", line 1432, in conda_exception_handler
Return_value=exception_handler (func, * args, * * kwargs)
File "F: Anaconda lib site packages conda exceptions. py", line 1135, in call
Return self. handle_exception (exc_val, exc_tb)
File "F: Anaconda lib site packages conda exceptions. py", line 1164, in handle_exception
Return self. handle_application_exception (exc_val, exc_tb)
File "F: Anaconda lib site packages conda exceptions. py", line 1178, in handle_application_exception
Self. print_conda_exception (exc_val, exc_tb)
File "F: Anaconda lib site packages conda exceptions. py", line 1182, in print_conda_exception
Print_conda_exception (exc_val, exc_tb)
File "F: Anaconda lib site packages conda exceptions. py", line 1109, in print_conda_exception
Stderrlog. error (" n% r n", exc_val)
File "F: Anaconda lib logging_ init. py", line 1506, in error
Self. log (ERROR, msg,args,**kwargs)
File "F: Anaconda lib logging_ init. py", line 1624, in the log
Self. handle (record)
File "F: Anaconda lib logging_ init. py", line 1633, in the handle
If (not self. disabled) and self. filter (record):
File "F: Anaconda lib logging_ init. py", line 821, in the filter
Result=f. filter (record)
File "F: Anaconda lib site packages conda gateways logging. py", line 48, in the filter
record.msg = record.msg %new_args
File "F: Anaconda lib site packages conda_ init. py", line 99, in repr
Chinese errs. append (e.repr())
File "F: Anaconda lib site packages conda_ init. py", line 54, in repr
The f "{self. class. name}: {self}" file is returned in
"F: Anaconda lib site packages conda_ init. py", line 58, in str
Str (self. message% self. _kwargs) ValueError: index returned in
Unsupported format character "T" at 692 (0x54)

@sandipan211
Copy link
Owner

When executing this code, I encountered some problems {conda install - c conda forge cudatoolkit dev} ERROR conda. core. link: _execute (740): An error occurred while installing the package "conda forge:: cudatoolkit-dev-11.7.0-h9f2f4db_6". Rollback transaction: complete Class: LinkError Message: The post link script of the software package conda forge:: cudatoolkit-dev-11.7.0-h9f2f4db_6 failed Location of the failed script: F: Anaconda envs zsd Scripts.cudatoolkit-dev-post-link.bat ==>Script Message<==

==>Script Output<== stdout: 7-Zip (a) 19.00 (x64): Copyright (c) 1999-2018 Igor Pavlov: 2019-02-21 Scan the drive for files: 1 file, 0 bytes Extract file: F: Anaconda envs zsd pkgs cudatoolkit dev cuda_11.7.0_516.01_windows.exe Cannot open as file: 1 File: 0 Size: 0 Compression: 0 Running post installation Reuse the previously downloaded F: Anaconda envs zsd pkgs cudatoolkit dev cuda_11.7.0_516.01_windows.exe Uncompress on Windows

Stderr:% Total% Received% Xferd Average Speed Time Time Current Total remaining speed of Dload upload 0 0 0 0 0 0 0 0--: --: --: --: --0 Error: F: Anaconda envs zsd pkgs cudatoolkit dev cuda_11.7.0_516.01_windows.exe Cannot open file as archive

F: Anaconda envs zsd bin cudatoolkit dev post install. py: 281: DeprecationWarning: distutils version class is deprecated. Please use packaging.version instead. If LooseVersion (cudatoolkit ["version"])>=LooseVersion ('11.6.0 '): Traceback (last call last time): File "F: Anaconda envs zsd bin cudatoolkit dev post install. py", line 311, in _In main() File "F: Anaconda envs zsd bin cudatoolkit dev post install. py", line 307, in _main Extractor. extract() The file "F: Anaconda envs zsd bin cudatoolkit dev post install. py", line 181, is in the extraction sub process. Run (cmd, env=os. environment. copy(), check=True) File "F: Anaconda envs zsd lib subprocess. py", line 487, when running Output=stdout, stderr=stderr) Subprocess.CalledProcessError: The command '['7za', 'x', 'F: Anaconda envs zsd pkgs cudatoolkit dev cuda_11.7.0_516.01_windows. exe', '- oc: Users dell AppData Local Temp tmp135hdu3w'] 'returns non-zero exit status 2. Return code: 1 kwargs: {} Backtracking (last call last call): File "F: Anaconda lib site packages conda exceptions.py", line 1132, after calling Return func (* args, * * kwargs) File "F: Anaconda lib site packages conda cli main. py", line 69, in main_subshel l Exit_code=do_call (args, p) File "F: Anaconda lib site packages conda cli conda_argparse. py", line 122, in do_call Return getattr (module, func_name) (args, parser) File "F: Anaconda lib site packages conda notices core. py", line 121, in the wrapper Return func (* args, * * kwargs) File "F: Anaconda lib site packages conda cli main_install. py", line 20, execute Installation (args, parser,'install') File "F: Anaconda lib site packages conda cli install. py", line 334, after installing Handle_txn (unlink_link_transaction, prefix,args,newenv) File "F: Anaconda lib site packages conda cli install. py", line 363, in handle_txn Unlink_link_transaction. execute() File "F: Anaconda lib site packages conda core link. py", line 283, in execution Self. _execute (tuple (chain (* chain (* zip (* self. prefix_action_groups. values()))))) File "F: Anaconda lib site packages conda core link. py", line 756, in execution Throwing CondaMultiError( conda.CondaMultiErrorclass: LinkError Message: The post link script of package conda forge:: cudatoolkit-dev-11.7.0-h9f2f4db_6 failed The location of the failed script: F: Anaconda envs zsd Scripts.cudatoolkit dev post link. bat ==>Script Message<==

==>Script Output<== stdout: 7-Zip (a) 19.00 (x64): Copyright (c) 1999-2018 Igor Pavlov: 2019-02-21 Scanning drive for files: 1 file, 0 bytes Extracting file: F: Anaconda envs zsd pkgs cudatoolkit dev cuda_11.7.0_516.01_windows.exe Cannot open as file: 1 File: 0 Size: 0 Compression: 0 Running post installation Reuse the previously downloaded F: Anaconda envs zsd pkgs cudatoolkit dev cuda_11.7.0_516.01_windows.exe Extract on Windows Stderr:% Total% Received% Xferd Average Speed Time Time Current Total remaining speed of Dload upload 0 0 0 0 0 0 0--: --: --: --: --: --: -- --0 Error: F: Anaconda envs zsd pkgs cudatoolkit dev cuda_11.7.0_516.01_windows.exe Cannot open file as archive F: Anaconda envs zsd bin cudatoolkit dev post install. py: 281: DeprecationWarning: distutils version class is deprecated. Please use packaging.version instead. If LooseVersion (cudatoolkit ["version"])>=LooseVersion ('11.6.0 '): Backtracking (last call last call): File "F: Anaconda envs zsd bin cudatoolkit dev post install. py", line 311, in In main() File "F: Anaconda envs zsd bin cudatoolkit dev post install. py", line 307, in the main Extractor. extract() File "F: Anaconda envs zsd bin cudatoolkit dev post install. py", line 181, in the extract sub In process. Run (cmd, env=os. environment. copy(), check=True) File "F: Anaconda envs zsd lib subprocess. py", line 487, when running Output=stdout, stderr=stderr) sub Process. CalledProcessError: The command '['7za', 'x', 'F: Anaconda envs zsd pkgs cudatoolkit dev cuda_11.7.0_516.01_windows. exe', '- oc: Users dell AppData Local Temp tmp135hdu3w'] 'returns non-zero exit status 2. Return code: 1 kwargs: {} :<exception str() failed> During the processing of the above exception, another exception occurred: Backtracking (last call last call): File "F: Anaconda Scripts conda script. py", line 12, in Sys. exit (main()) File "F: Anaconda lib site packages conda cli main. py", line 112, in the main Return conda_exception_handler (main, * args, * * kwargs) File "F: Anaconda lib site packages conda exceptions. py", line 1432, in conda_exception_handler Return_value=exception_handler (func, * args, * * kwargs) File "F: Anaconda lib site packages conda exceptions. py", line 1135, in call Return self. handle_exception (exc_val, exc_tb) File "F: Anaconda lib site packages conda exceptions. py", line 1164, in handle_exception Return self. handle_application_exception (exc_val, exc_tb) File "F: Anaconda lib site packages conda exceptions. py", line 1178, in handle_application_exception Self. print_conda_exception (exc_val, exc_tb) File "F: Anaconda lib site packages conda exceptions. py", line 1182, in print_conda_exception Print_conda_exception (exc_val, exc_tb) File "F: Anaconda lib site packages conda exceptions. py", line 1109, in print_conda_exception Stderrlog. error (" n% r n", exc_val) File "F: Anaconda lib logging_ init. py", line 1506, in error Self. log (ERROR, msg,args,**kwargs) File "F: Anaconda lib logging_ init. py", line 1624, in the log Self. handle (record) File "F: Anaconda lib logging_ init. py", line 1633, in the handle If (not self. disabled) and self. filter (record): File "F: Anaconda lib logging_ init. py", line 821, in the filter Result=f. filter (record) File "F: Anaconda lib site packages conda gateways logging. py", line 48, in the filter record.msg = record.msg %new_args File "F: Anaconda lib site packages conda_ init. py", line 99, in repr Chinese errs. append (e.repr()) File "F: Anaconda lib site packages conda_ init. py", line 54, in repr The f "{self. class. name}: {self}" file is returned in "F: Anaconda lib site packages conda_ init. py", line 58, in str Str (self. message% self. _kwargs) ValueError: index returned in Unsupported format character "T" at 692 (0x54)

I think you mistyped the command a little bit - you missed some hyphens. It should be:

conda install -c conda-forge cudatoolkit-dev 

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