13

I followed an instruction from a book and installed CUDA Toolkit version 9.2. Then I got this error

ImportError: Could not find 'cudart64_90.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 9.0 from this URL: https://developer.nvidia.com/cuda-toolkit

I searched and found that tensorflow needs 9.0, but what should I do next? Should I delete the old version of CUDA then install the 9.0 ver., or just install 9.0(so I would have two version co-existing)? I don't want to break my computer, help~~~

Edit:

I downloaded CUDA9.0 patch1 from the link: https://developer.nvidia.com/cuda-90-download-archive?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exelocal . But it seems like the installer didn't work(it disappeared immediately when I double clicked it)?

4
  • The patch version isn't a full installer. it is, as the name suggests, a patch for an existing CUDA 9 installation. Read hat is at the download page next tme.... Commented May 19, 2018 at 6:52
  • @talonmies: Thanks for your reminder, but actually patch2 of CUDA9.0 is a full installer(I mean its interface is the same as installing CUDA9.0), but patch1 is just a 'blink' (like a result of command prompt without system pause). That's why I thought it might be an error. Commented May 19, 2018 at 7:02
  • 1
    No it is not. (Re)Read what is at the download page -- "The base installer is available for download below. There are 2 patches available. These patches require the base installer to be installed first." (Emphasis mine) Commented May 21, 2018 at 8:19
  • Google cloud now has tensorflow 1.10 images for CUDA 9.2. You can create a vm with gpu and choose one of the pre-installed tensorflow images. The created vm will also have .whl files for different python versions. You might be able to copy .whl file from the vm and install it somewhere else. Though I haven't tried it out. Commented Sep 25, 2018 at 19:46

5 Answers 5

14

From its forum: https://devtalk.nvidia.com/default/topic/493290/multiple-cuda-versions-can-they-coexist-/, they said multiple different version of CUDA can co-exist! Just download all versions you need and download all patches(blink or not) and corresponding cuDNN. I installed tensorflow in the virtual environment using conda and after installed all the stuff(restart computer/re-open command prompt several times) then it works now!

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, this was useful. For those who want to additively install cuda9.0 using .run file, don't install the driver (say 'no' when asked) durig the .run install. I don't know why NVIDIA doesn't give this information in the installation guide.
1

I had a same problem and then I solved it by changing python 3.5 to python 3.6. Hope you can solve it too.

1 Comment

Just tried it and it didn't work (Windows7, tensorflow-1.9 binary install).
0

If you installed higher version of Cuda, just run the lower version Cuda installer, it will automatically delete the installed version if its not the same version. In my case on Windows 10, Cuda9.2 was deleted by the Cuda9.0 installer. Thanks!

Comments

0

For Ubuntu 16.04 worked:

https://developer.nvidia.com/cuda-90-download-archive -> deb (network)

Follow instructions from Nvidia and then install just libraries (next to already installed 9.2 Cuda Toolkit):

sudo apt-get install cuda-libraries-9-0

1 Comment

I have already cuda-9.2 installed in my ubuntu 16.4 and tried installing the cuda 9.0 libraries only. but sudo apt-get install cuda-libraries-9-0 doesn't work, giving me this message : E: Unable to locate package cuda-libraries-9-0
0

Follow all the steps mentioned in following link. I got work Tensorflow in Ubuntu 18.04

http://www.python36.com/how-to-install-tensorflow-gpu-with-cuda-9-2-for-python-on-ubuntu/

After you confirmed the installation of the nvidia drivers, you need to install cuDNN, NCCL and Dependencies (libcupti-dev and add LD_LIBRARY_PATH). Then configure TensorFlow from source.

wget https://github.com/bazelbuild/bazel/releases/download/0.14.0/bazel-0.14.0-installer-linux-x86_64.sh chmod +x bazel-0.14.0-installer-linux-x86_64.sh ./bazel-0.14.0-installer-linux-x86_64.sh --user echo 'export PATH="$PATH:$HOME/bin"' >> ~/.bashrc 

and Reload environment variables.Start the process of building TensorFlow by downloading latest tensorflow . After that you need to Build Tensorflow using bazel. This process will take a lot of time. It may take hours.

git clone https://github.com/tensorflow/tensorflow.git cd tensorflow git pull git checkout r1.8 ./configure bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package 

To build whl file issue following command:

bazel-bin/tensorflow/tools/pip_package/build_pip_package tensorflow_pkg 

To install tensorflow with pip:

cd tensorflow_pkg 

for existing virtual environment:

pip install tensorflow*.whl 

After that you can verify your TensorFlow installation by running a simple example.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.