cfzd / Ultra-Fast-Lane-Detection-v2

Ultra Fast Deep Lane Detection With Hybrid Anchor Driven Ordinal Classification (TPAMI 2022)
MIT License
583 stars 96 forks source link

ModuleNotFoundError: No module named 'nvidia.dali.plugin.base_iterator' #10

Open Aruen24 opened 2 years ago

Aruen24 commented 2 years ago

the cuda version must 10.2?

cfzd commented 2 years ago

@wang911205 It is a problem of Nvidia DALI. If you didn't install DALI, please install DALI. If you have installed, please report more details.

Aruen24 commented 2 years ago

@wang911205 It is a problem of Nvidia DALI. If you didn't install DALI, please install DALI. If you have installed, please report more details.

I install nvidia-dali-cuda101. my CUDA Version: 10.1. and the cuda version must 10.2?

cfzd commented 2 years ago

@wang911205 I think as long as the DALI version matchs the CUDA version, it should be ok.

Eliza-wxq commented 2 years ago

Can I install Nvidia - Dali on Windows?

cfzd commented 2 years ago

@Eliza-wxq It seems dali do not support windows.

mikechen66 commented 1 year ago

ModuleNotFoundError: No module named 'nvidia'

While I prepare to install TensorFlow 2.12.0, TensorFlow team have the following commands. But I get the error: ModuleNotFoundError: No module named 'nvidia'. What's wrong with the commands. Please indicate how to solve it. Thanks.

Install TensorFlow with pip https://www.tensorflow.org/install/pip

$ mkdir -p $CONDA_PREFIX/etc/conda/activate.d
$ echo 'CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
$ echo 'export LD_LIBRARY_PATH=$CONDA_PREFIX/lib/:$CUDNN_PATH/lib:$LD_LIBRARY_PATH' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
$ source $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh

Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'nvidia' dirname: missing operand Try 'dirname --help' for more information.

With the similar context, TensorFlow team has the following answer on the installation error.

https://discuss.tensorflow.org/t/tensorflow-installation-error/15889

But it seems that the problem has not yet solved.

mikechen66 commented 1 year ago

I have solved the problem but still can not use TensirFlow 2.12 or above

1 .Create tf env

$ conda create --name tf python=3.10
$ conda activate tf

2.Install cuda and cudnn in tf

Continue in the tf environment:

$ conda install -c conda-forge cudatoolkit=11.8.0
$ pip install nvidia-cudnn-cu11==8.6.0.163

(including the cublas downloading and installation)

But is has show the error. $ nvcc --version CUDA Toolkit is not installed.

3. Configure the env

mkdir -p $CONDA_PREFIX/etc/conda/activate.d
echo 'CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
echo 'export LD_LIBRARY_PATH=$CONDA_PREFIX/lib/:$CUDNN_PATH/lib:$LD_LIBRARY_PATH' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
source $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh

After all the installtion are executed in the tf environment, it does not show ModuleNotFoundError: No module named 'nvidia'

4. Verification

python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

_2023-08-03 17:42:07.337886: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2023-08-03 17:42:07.926267: W tensorflow/compiler/tf2tensorrt/utils/pyutils.cc:38] TF-TRT Warning: Could not find TensorRT

Reference: