I have find the reason is ldconf, ldconfig is a dynamic link library management command whose purpose is to allow the dynamic link library to be usedby the system.
- Importerror Libcuda.so.1 Cannot Open Shared Object File No Such File Or Directory Anaconda
- Importerror Libcuda.so.1 Cannot Open Shared Object File No Such File Or Directory Tensorflow Docker
- Importerror Libcuda.so.1 Cannot Open Shared Object File No Such File Or Directory Conda
The default ldconf only search /lib and /usr/lib, as well as the library file under the directory listed in the configuration file /etc/ld. so. conf.
so all of this is caused by the dynamic library of CUDA in the installed CUDA path such as : /path/cuda-9.0/lib64 or /path/cuda-9.0/lib. (for example my CUDA is installed in /usr/local/cuda-9.0)
1.if you install the CUDA manual, then after install, you should add the path of cuda/lib64 to /etc/ld.so.conf file
then
of course , you can add the path manual, like:
vim /etc/ld.so.conf
then add the path '/usr/local/cuda-9.0' at the end.
then update it
after the operation, reopen the ipython or pycharm ,
wow, you will enjoy it!
sudo echo '/usr/local/cuda-9.0/lib64/' >> /etc/ld.so.conf
then
sudo ldconfig
of course , you can add the path manual, like:
vim /etc/ld.so.conf
then add the path '/usr/local/cuda-9.0' at the end.
then update it
sudo ldconfig
after the operation, reopen the ipython or pycharm ,
import tensorflow as tf
wow, you will enjoy it!
if you install the CUDA by command such as 'dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb' or others, it may add the cuda lib path to the /etc/ld.so.conf automatically . but to be on the safe side, check the /etc/ld.so.conf and see if the path add to it .
When trying to import OpenCV, using
import cv2
I get the following error:Not sure how to fix this - trying to play around with Google's new Colaboratory tool. Notebook is here: https://drive.google.com/file/d/0B7-sJqBiyjCcRmFkMzl6cy1iN0k/view?usp=sharing
Dmitry Rastorguev
Dmitry RastorguevDmitry Rastorguev1,24011 gold badge55 silver badges1212 bronze badges
6 Answers
This fixed the problem by having it as the first two lines of the script: Iso 30401.
Dmitry RastorguevDmitry Rastorguev1,24011 gold badge55 silver badges1212 bronze badges
You need to add sudo . I did the following to get it installed :
sudo apt-get install libsm6 libxrender1 libfontconfig1
and then did that
sudo python3 -m pip install opencv-contrib-python
Importerror Libcuda.so.1 Cannot Open Shared Object File No Such File Or Directory Anaconda
FINALLY got it done ! Amintiri din copilarie torrent.
CHAMI SoufianeCHAMI Soufiane
For CentOS, run this:
sudo yum install libXext libSM libXrender
CaesarCaesar
May be the problem is with your
Raptorpython-opencv
version. It's better to downgrade your version to 3.3.0.9 which does not include any GUI dependencies. Same question was found on GitHub here the link to the answer. 36.4k3232 gold badges183183 silver badges305305 bronze badges
CredozCredoz
There is now a headless version of
opencv-python
which removes the graphical dependencies (like libSM). You can see the normal / headless version on the releases page (and the GitHub issue leading to this); just add -headless
when installing, e.g.,Importerror Libcuda.so.1 Cannot Open Shared Object File No Such File Or Directory Tensorflow Docker
NathanNathan2,81011 gold badge1616 silver badges3131 bronze badges
I was not able to install cv2 on Anaconda-Jupyter notebook running on Ubuntu on Google Cloud Platform. But I found a way to do it as follows:
Run the following command from the ssh terminal and follow the instruction:
Once its installed Open the Jupyter notebook and run following command:
Note: I tried to run this command: 'sudo python3 -m pip install opencv-contrib-python'but it was showing an error. But above command worked for me.
Now refresh the notebook page and check whether it's installed or not by running
import cv2
in the notebook. YogeshYogesh
Not the answer you're looking for? Browse other questions tagged pythonopencvpython-importimporterrorpython-module or ask your own question.
I am getting this error when I want to import tensorflow-gpu on Ubuntu 16.04.
I have installed CUDA 9.1 properly, cudNN 7.1 properly and tested both without facing any problem. (using python 3.5 2.)
I have used pip3 in either ways (with several tensorflow versions):i tried:
I have tried to install several versions of tensorflow-gpu , 1.4, 1.5 , 1.8 ,1.9. still getting the same error, when running
Is there any way to get rid of this? or it is just installing cuda 9.0 ( which will be the pain as it took a week for me to install the cuda 9.1 due to problems of nvidia and Ubuntu !)
I also installed libcupti (required) and Bazel (required).from this page:http://www.python36.com/install-tensorflow141-gpu/2/
moreover, i have installed the same setup on windows (tensorflow 1.8 , cuda 9.1) without any problem.
Omid
OmidOmid
1 Answer
You're trying to build
tensorflow-gpu 1.4
, which is too old to be compatible with CUDA 9.1. From here you have three options:
- You can try to create a symbolic link to force the system to use CUDA 9.1, though it's not sure it'll succeed
- You can follow this tutorial which explains how to easily install CUDA 9.0 on Ubuntu 16.04.
- If it still doesn't work and that you really want to try to install Tensorflow with CUDA 9.1, you can try to install CUDA, CUDNN and NCCL sources from the NVIDIA site, and then emulate the way these packages would have been installed from ppa.
Once you've downloaded the
tar
packages, type the following to configure CUDA: Then you can either download cuDNN and NCCL from source and configure them in the same fashion as above (this article here explains how to do so), or download their
.deb
package and see if the installation works now. If it doesn't, then try to install from source. Importerror Libcuda.so.1 Cannot Open Shared Object File No Such File Or Directory Conda
avazulaavazula