Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import tensorflow CPU error - nvcuda.dll not found

Apologies if this has been reported already at some other place, I have been looking for it quite some time, without success. I am trying to import tensorflow library (the CPU version only) and I am running into the below error:

ImportError: Could not find 'nvcuda.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Typically it is installed in 'C:\Windows\System32'. If it is not present, ensure that you have a CUDA-capable GPU with the correct driver installed.

From my understanding, this error occurs only for running the GPU version of the library. I double checked and I do not have tensorflow-GPU installed. I tried uninstalling and reinstalling tensorflow and I get the same error. I do not have a NVIDIA graphics card and my machine only has a Intel (R) UHD Graphics 620 card.

I am using Anaconda installation of Python and the Jupyter notebook to run my code. Any help would be appreciated.

like image 851
Suraj Radhakrishnan Avatar asked Oct 20 '25 16:10

Suraj Radhakrishnan


1 Answers

As discussed in the comments, the problem was that you had not created a new environment for all your pip packages, which is the first recommendation to anyone installing TensorFlow by a tutorial.

The base environment of 'conda' should never be used to install Tensorflow packages. After creating the environment, simply go to a command prompt and type:

conda activate <the_environment_name_u_just_created>

Then you can run the following command to reinstall the CPU version of Tensorflow 2.0 :-

pip install --ignore-installed --upgrade TensorFlow

Which is useful to clear out any previous broken installs and create a new one that should work.

like image 139
neel g Avatar answered Oct 23 '25 07:10

neel g



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!