When installing cudnn, after the installation, import tensorflow will have the error in the question,
This error is either caused by the configuration of environment variables or the establishment of cudnn connection.
1. Environmental variables
Add at the end of ~ /. Bashrc
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_ LIBRARY_ PATH=/usr/local/cuda/lib64${LD_ LIBRARY_ PATH:+:${LD_ LIBRARY_ PATH}}
export CUDA_ HOME=/usr/local/cuda
2. Cudnn connection establishment
cd /usr/local/cuda/lib64
sudo rm -rf libcudnn.so libcudnn.so . 7 # delete the original version number, which is queried in cudnn / lib64
sudo ln -s libcudnn.so .7.0.5 libcudnn.so . 7 # generate a soft connection and pay attention to the version number you download
sudo ln -s libcudnn.so .7 libcudnn.so
Sudo ldconfig # effective immediately
Read More:
- Importerror of [docker] error: libGL.so .1: cannot open shared object file: No such file or directory
- OSError: libnccl.so.2: cannot open shared object file: No such file or directory
- Problem solving: importerror: libcublas.so .9.0: cannot open shared object file: No such file
- error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file o
- error while loading shared libraries: libpng16.so.16: cannot open shared object file: No such file
- error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file
- CONDA 3090 install tenslow GPU report error importerror: libcublas.so .9.0: cannot open shared object file
- [gdb] error while loading shared libraries: libcunit.so.1: cannot open shared object file
- libaio.so . 1: cannot open shared object file solution
- When Python Django creates a database, can’t open file ‘ manage.py ‘: [Errno 2] No such file or directory
- #During OpenGL development, fatal error C1083: can’t open include file: “GL / glut. H”: no such file or directory
- In VS2010, the compiler cannot open the file “GL / glaux. H”: no such file or directory
- Cannot open include file: ‘io.h‘: No such file or directory
- VS2010 compiler can’t open include file: “GL / glaux. H”: no such file or directory
- How to solve the problem of “unable to open include file:” graphics. H “: no such file or directory”
- Vs2019 OpenGL glut: error: unable to open include file: ‘GL / glut. H’: no such file or directory
- Error in header file when calling OpenGL to open obj file in vs2013: unable to open include file: “GL / glut. H”: no such file or directories
- Solve the software startup error while loading shared libraries: libgd. So. 2: cannot open shared object error
- The first time I write OpenGL program, what should I do when I encounter “can’t open include file:” GL / glaux. H “: no such file or directory”?
- pytools.prefork.ExecError: error invoking ‘nvcc –version‘: [Errno 2] No such file or directory