Comments (21)
For this error
ImportError: libcudart.so.7.0: cannot open shared object file: No such file or directory
I have executed this command to solve it
sudo ldconfig /usr/local/cuda/lib64
from digits.
Two suggestions:
- You should use
digits-devserver
instead ofdigits-server
. The devserver runs a user-level application, so you don't need root permissions for anything. This will also give you an interactive prompt for setting the configuration options. - Both of your issues seem to be regarding environment variables. You probably need to add these two lines to your .bashrc (but customized to match the installation on your machine, of course):
export CAFFE_ROOT=/home/username/caffe
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
from digits.
I have import error: ImportError: libcudnn.so.7: cannot open shared object file: No such file or directory
with CUDA 9.0
Tensorflow 1.5
download https://developer.nvidia.com/rdp/cudnn-download 7.0.5 for cuda 9.0
sudo rm -rf /usr/local/cuda/include/cudnn.h
sudo rm -rf /usr/local/cuda/lib64/libcudnn*
cd
cd cuda
sudo cp include/cudnn.h /usr/local/cuda/include/
sudo cp lib64/lib* /usr/local/cuda/lib64/
cd /usr/local/cuda/lib64/
sudo chmod +r libcudnn.so.7.0.5
sudo ln -sf libcudnn.so.7.0.5 libcudnn.so.7
sudo ln -sf libcudnn.so.7 libcudnn.so
sudo ldconfig
It works for me.
from digits.
In case someone else runs into this... I got an error (something about libcudnn.so is not a symbolic link
or something) when trying ldconfig
. My directory looked like this:
See how the libcudnn.so
files are duplicated instead of linked like the others? I deleted the first two, and then made it a chain of symbolic links like so:
sudo rm libcudnn.so
sudo rm libcudnn.so.5
sudo ln -s libcudnn.so.5.0.5 libcudnn.so.5
sudo ln -s libcudnn.so.5 libcudnn.so
I actually came here in search of fixing a TensorFlow problem - this ended up fixing it.
from digits.
@Saneesh Thanks a lot. When I run sudo ldconfig /usr/local/cuda/lib (not for lib64) it became work.
from digits.
@chrisranderson if you installed cuDNN with a deb package instead of with a tarball then you wouldn't run into this issue.
from digits.
Thanks so much - this has solved the issue.
from digits.
@Saneesh Thank you! Solved mine
from digits.
For those of you on Ubuntu 14.04 who have installed CUDA 7.0 or 7.5 with a .deb package, you can now solve this problem by installing the cuda-ld-conf-7-0
package (or cuda-ld-conf-7-5
, if you like).
$ apt-cache show cuda-ld-conf-7-0
Package: cuda-ld-conf-7-0
Depends: cuda-cudart-7-0, cuda-cublas-7-0, cuda-curand-7-0, cuda-license-7-0
Description: CUDA ld.so.conf files
With this package, your programs will be able to find the CUDA shared
libraries without editing the LD_LIBRARY_PATH environment variable.
You can follow these instructions to get access to the repository that contains these packages.
from digits.
For more information, please see the "Environment" section of docs/InstallCuda.md.
from digits.
@Saneesh this is one of those life saving tips. Thanks a ton!
from digits.
@Saneesh Many Thanks. Solved my problem.
from digits.
@lukeyeager how do I do that? (I'm in Ubuntu 16.04 if that matters)
from digits.
@chrisranderson have a look at the CUDA install doc.
from digits.
@Saneesh Bloody legend
from digits.
Same case is with cuDNN 5.1. Follow the solution of @chrisranderson
from digits.
thanks @Saneesh your solution saved my life with matconvnet
from digits.
sagar@sagar-HP-Pavilion-Notebook:~/caffe2/caffe2/python/examples$ python char_rnn.py --train_data shakespeare.txt
WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode.
WARNING:root:Debug message: libcudnn.so.7: cannot open shared object file: No such file or directory
Segmentation fault (core dumped)
How to solve this error?
from digits.
when I run the code this message appear anyone can help me please, i'm new in python and I try to learn DL ML and AI application tool.
Using TensorFlow backend.
Traceback (most recent call last):
File "C:\Users\Somsanith_s\PycharmProjects\MytestDec118\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(file)])
File "C:\Users\Somsanith_s\AppData\Local\Programs\Python\Python37-32\lib\imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Somsanith_s\PycharmProjects\MytestDec118\venv\lib\site-packages\tensorflow\python_init_.py", line 54, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\Somsanith_s\PycharmProjects\MytestDec118\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in
_pywrap_tensorflow = swig_import_helper()
File "C:\Users\Somsanith_s\PycharmProjects\MytestDec118\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
import _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/Somsanith_s/PycharmProjects/MytestDec118/App_mytest.py", line 401, in
from keras.models import Sequential
File "C:\Users\Somsanith_s\PycharmProjects\MytestDec118\venv\lib\site-packages\keras_init_.py", line 3, in
from . import utils
File "C:\Users\Somsanith_s\PycharmProjects\MytestDec118\venv\lib\site-packages\keras\utils_init_.py", line 6, in
from . import conv_utils
File "C:\Users\Somsanith_s\PycharmProjects\MytestDec118\venv\lib\site-packages\keras\utils\conv_utils.py", line 9, in
from .. import backend as K
File "C:\Users\Somsanith_s\PycharmProjects\MytestDec118\venv\lib\site-packages\keras\backend_init_.py", line 89, in
from .tensorflow_backend import *
File "C:\Users\Somsanith_s\PycharmProjects\MytestDec118\venv\lib\site-packages\keras\backend\tensorflow_backend.py", line 5, in
import tensorflow as tf
File "C:\Users\Somsanith_s\PycharmProjects\MytestDec118\venv\lib\site-packages\tensorflow_init_.py", line 24, in
from tensorflow.python import *
File "C:\Users\Somsanith_s\PycharmProjects\MytestDec118\venv\lib\site-packages\tensorflow\python_init_.py", line 60, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\Somsanith_s\PycharmProjects\MytestDec118\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(file)])
File "C:\Users\Somsanith_s\AppData\Local\Programs\Python\Python37-32\lib\imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Somsanith_s\PycharmProjects\MytestDec118\venv\lib\site-packages\tensorflow\python_init_.py", line 54, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\Somsanith_s\PycharmProjects\MytestDec118\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in
_pywrap_tensorflow = swig_import_helper()
File "C:\Users\Somsanith_s\PycharmProjects\MytestDec118\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
import _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'
Error importing tensorflow. Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there.
from digits.
the important is " Error importing tensorflow. Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there."
from digits.
:~$ sudo apt-get install libcudnn*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libcudnn-dev' for glob 'libcudnn*'
Note, selecting 'libcudnn8-dev' for glob 'libcudnn*'
Note, selecting 'libcudnn7' for glob 'libcudnn*'
Note, selecting 'libcudnn8' for glob 'libcudnn*'
libcudnn8 is already the newest version (8.2.0.53-1+cuda11.3).
libcudnn-dev is already the newest version (7.6.5-0lambda1).
libcudnn7 is already the newest version (7.6.5-0lambda1).
The following packages were automatically installed and are no longer required:
ledit libfindlib-ocaml libfindlib-ocaml-dev libldap2-dev ocaml-compiler-libs ocaml-findlib
ocaml-interp ocaml-man ocaml-nox wine-stable wine-stable-amd64 wine-stable-i386:i386
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
libcudnn8-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/582 MB of archives.
After this operation, 2,570 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 448004 files and directories currently installed.)
Preparing to unpack .../libcudnn8-dev_8.2.0.53-1+cuda11.3_amd64.deb ...
Unpacking libcudnn8-dev (8.2.0.53-1+cuda11.3) ...
dpkg: error processing archive /var/cache/apt/archives/libcudnn8-dev_8.2.0.53-1+cuda11.3_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libcudnn_static.a', which is also in package libcudnn-dev:amd64 7.6.5-0lambda1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libcudnn8-dev_8.2.0.53-1+cuda11.3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
and then
x [master]> use_condaenv("tf")
✓ [master]> library(tensorflow)
✓ [master]> hello <- tf$constant('Hello, TensorFlow!')
Error: Python module tensorflow was not found.
Detected Python configuration:
python: /home/englianhu/anaconda3/bin/python3
libpython: /home/englianhu/anaconda3/lib/libpython3.8.so
pythonhome: /home/englianhu/anaconda3:/home/englianhu/anaconda3
version: 3.8.10 (default, May 19 2021, 18:05:58) [GCC 7.3.0]
numpy: /home/englianhu/.local/lib/python3.8/site-packages/numpy
numpy_version: 1.19.5
tensorflow: /home/englianhu/.local/lib/python3.8/site-packages/tensorflow
NOTE: Python version was forced by RETICULATE_PYTHON
from digits.
Related Issues (20)
- How to upload pretrained model with digits:20.03-tensorflow-py3
- Isn't the dataset parallelized?
- Convert YOLO Labels to KITTI Labels
- AWS DIGITS: ERROR: ValueError: invalid literal for int() with base 10
- Failed to build Caffe on Xavier NX
- KITTI Data Trains in TF but not in Digits
- DIGITS OBJECT DETECT DATASET TRAINING ERROR HOT 1
- map validation
- How to change digits default gpu number '0'?
- DIGITS 6 docker - Can't train MNIST demo
- Nvidia A100 & Caffe Container HOT 1
- where to download Digit 21.2 ?
- Building Caffe with CUDA
- Detectnet, Multiple class object detection with an imbalanced dataset, Poor results (mAP) for one class
- Module Creation erros
- cannot see detectnet bounding boxes using Caffe model on Nano
- Is there a way to backup the entire database? HOT 1
- I'm confused between which version of DIGITS to install
- Inference HOT 7
- DIGITS DOCKET CONTAINER INSTALLING SUNNY PLUGIN HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from digits.