CuDNN is not available in binary-installed cupy - chainer

I installed Cupy using the binary package cupy-cuda92, but CuDNN is not loaded.
$ pip install cupy-cuda92==5.4.0 chainer==5.4.0
$ python -c 'import chainer; chainer.print_runtime_info()'
/home/xxxxx/.pyenv/versions/3.5.2/lib/python3.5/site-packages/chainer/backends/cuda.py:98: UserWarning: cuDNN is not enabled.
Please reinstall CuPy after you install cudnn
(see https://docs-cupy.chainer.org/en/stable/install.html#install-cudnn).
'cuDNN is not enabled.\n'
Platform: Linux-4.4.0-103-generic-x86_64-with-debian-stretch-sid
Chainer: 5.3.0
NumPy: 1.16.2
CuPy:
CuPy Version : 5.3.0
CUDA Root : /usr/local/cuda
CUDA Build Version : 9020
CUDA Driver Version : 9020
CUDA Runtime Version : 9020
cuDNN Build Version : None
cuDNN Version : None
NCCL Build Version : 2307
NCCL Runtime Version : 2402
iDeep: Not Available
I tried uninstalling & reinstalling chainer and cupy with --no-cache-dir but saw no difference. I also confirmed that CUDA is 9.2.
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Wed_Apr_11_23:16:29_CDT_2018
Cuda compilation tools, release 9.2, V9.2.88

I found the problem and a solution on my own.
First I tried to import cudnn directly.
$ python
Python 3.5.2 (default, Mar 25 2019, 10:54:56)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cupy.cuda.cudnn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /home/xxxxx/.pyenv/versions/3.5.2/lib/python3.5/site-packages/cupy/cuda/cudnn.cpython-35m-x86_64-linux-gnu.so: symbol cudnnGetBatchNormalizationTrainingExReserveSpaceSize, version libcudnn.so.7 not defined in file libcudnn.so.7 with link time reference
thus there is a kind of library version mismatch. I checked my LD_LIBRARY_PATH and found that different versions of CuDNN are installed via cudnnenv. I removed them from LD_LIBRARY_PATH and the problem was gone.
$ python -c 'import chainer; chainer.print_runtime_info()'
Platform: Linux-4.4.0-103-generic-x86_64-with-debian-stretch-sid
Chainer: 5.3.0
NumPy: 1.16.2
CuPy:
CuPy Version : 5.3.0
CUDA Root : /usr/local/cuda
CUDA Build Version : 9020
CUDA Driver Version : 9020
CUDA Runtime Version : 9020
cuDNN Build Version : 7402
cuDNN Version : 7500
NCCL Build Version : 2307
NCCL Runtime Version : 2402
iDeep: Not Available

Related

Robotframework: SessionNotCreatedException: Message: Error: NS_BINDING_ABORTED

I am getting the below error when trying to execute the robotframework test scripts.
Parent suite setup failed:
SessionNotCreatedException: Message: Error: NS_BINDING_ABORTED
Stacktrace:
#checkLoadingState#chrome://remote/content/shared/Navigate.jsm:209:28
onStateChange#chrome://remote/content/shared/Navigate.jsm:254:28
Tests.Suites.Layer2.Dhl.Dhl Session | FAIL |
Suite setup failed:
SessionNotCreatedException: Message: Error: NS_BINDING_ABORTED
Stacktrace:
#checkLoadingState#chrome://remote/content/shared/Navigate.jsm:209:28
onStateChange#chrome://remote/content/shared/Navigate.jsm:254:28
Below are the list of files installed:
I installed python 3.10.5
C:\aoswebtest>pip list
Package Version
async-generator 1.10
attrs 21.4.0
bcrypt 3.2.2
certifi 2022.5.18.1
cffi 1.15.0
cryptography 36.0.1
et-xmlfile 1.1.0
h11 0.13.0
idna 3.3
openpyxl 3.0.9
outcome 1.1.0
paramiko 2.11.0
pip 22.0.4
pycparser 2.21
pydevd 2.7.0
PyNaCl 1.5.0
pyOpenSSL 22.0.0
PyYAML 6.0
robotframework 4.1.3
robotframework-pythonlibcore 3.0.0
robotframework-seleniumlibrary 6.0.0
robotframework-sshlibrary 3.8.0
scapy 2.4.5
scp 0.14.4
selenium 4.1.0
setuptools 58.1.0
six 1.16.0
sniffio 1.2.0
sortedcontainers 2.4.0
trio 0.20.0
trio-websocket 0.9.2
urllib3 1.26.9
webcolors 1.11.1
wsproto 1.1.0
xlrd 2.0.1
Can you anyone help my with this?
I have the same error. I used my pc and run selenium with firefox then it works fine. But when I copy code and run other pc, it shows error NS_BINDING_ABORTED.
I fix it by: downgrade firefox version(from 103.x.x -> 92.x.x)

Installation of TensorFlow not found in Rstudio (on Mac)

I am new to TensorFlow and Keras and I installed them in Rstudio using a conda virtual environment. I run the following line and everything works.
library(reticulate)
use_condaenv("r-reticulate")
library(tensorflow)
library(keras)
However when I try to call the function "keras_model_sequential()" I get this error:
**Error: Python module tensorflow.keras was not found.
Detected Python configuration:
python: /anaconda3/envs/r-reticulate/bin/python
libpython: //anaconda3/envs/r-reticulate/lib/libpython3.6m.dylib
pythonhome: /anaconda3/envs/r-reticulate:/anaconda3/envs/r-reticulate
version: 3.6.10 |Anaconda, Inc.| (default, Mar 25 2020, 18:53:43) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
numpy: /anaconda3/envs/r-reticulate/lib/python3.6/site-packages/numpy
numpy_version: 1.19.2
tensorflow: /anaconda3/envs/r-reticulate/lib/python3.6/site-packages/tensorflow
python versions found:
/anaconda3/envs/r-reticulate/bin/python
/usr/bin/python
/anaconda3/envs/covid19/bin/python
/anaconda3/envs/test/bin/python
/anaconda3/envs/test2/bin/python
**
What should I do? I am using a Mac with El Capitan (version 10.11.6). Thank you very much Riccardo

Error: ModuleNotFoundError: No module named 'keras' when using keras in R

I have a problem running Keras in R. When running mnist <- dataset_mnist() I get the error Error: ModuleNotFoundError: No module named 'keras'
I have installed the most recent version of Anaconda, I am running R version 3.5.1 in RStudio 1.1.463. In R I have run
library("keras")
install_keras()
and this succeeds.
When trying to run mnist <- dataset_mnist() I initially got the following error message:
ImportError: No module named keras
Use the install_keras() function to install the core Keras library
Error: Error loading Python module keras
When running
library(reticulate)
py_config()
I got the following output:
python: /usr/bin/python
libpython: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib
pythonhome: /System/Library/Frameworks/Python.framework/Versions/2.7:/System/Library/Frameworks/Python.framework/Versions/2.7
version: 2.7.10 (default, Oct 6 2017, 22:29:07) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]
numpy: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy
numpy_version: 1.8.0
keras: [NOT FOUND]
After looking at suggested solutions to other topics, I added this line to my .Rprofile
Sys.setenv(RETICULATE_PYTHON = "/anaconda3/envs/r-tensorflow/bin")
However when I run mnist <- dataset_mnist() now I get the following error:
Error: Python module keras was not found.
Detected Python configuration:
python: /anaconda3/envs/r-tensorflow/bin/python
libpython: /anaconda3/envs/r-tensorflow/lib/libpython3.6m.dylib
pythonhome: /anaconda3/envs/r-tensorflow:/anaconda3/envs/r-tensorflow
version: 3.6.7 | packaged by conda-forge | (default, Nov 20 2018, 18:37:09) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
numpy: [NOT FOUND]
keras: /anaconda3/envs/r-tensorflow/lib/python3.6/site-packages/keras
NOTE:
Does anyone know what I can do to solve this?

How to set pyenv python for reticulate

I'm using 1.10 version of reticulate package ( R version is 3.5.1) and I want to configure it to use pyenv python (path is /Users/name/.pyenv/versions/hak/bin/python). Running py_config() won't show me this python as available:
python: /usr/bin/python
libpython:
/System/Library/Frameworks/Python.
framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib
pythonhome:
/System/Library/Frameworks/Python.
framework/Versions/2.7:/System/Library
/Frameworks/Python.framework/Versions/2.7
version: 2.7.10 (default, Oct 6 2017, 22:29:07)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]
numpy: /System/ Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy
numpy_version: 1.8.0
python versions found:
/usr/bin/python
/usr/local/bin/python
/usr/local/bin/python3
Because my pyenv python isnt available I set RETICULATE_PYTHON env variable on mentioned path. But now i get the error
Error in initialize_python(required_module, use_environment) :
Python shared library
'/Users/name/.pyenv/versions/3.6.5/lib/libpython3.6.dylib'
not found, Python bindings not loaded.
Does anybody know how to solve this ?
pyenv doesn't build pythons with shareable libraries by default. to make sure it does either have the CONFIGURE_OPTIONS variable set or preface your pyenv build $VERSION commands as in the example below:
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.7.5
see:
https://github.com/pyenv/pyenv/blob/master/plugins/python-build/README.md#building-with---enable-shared)

Error when updating sbt using apt [Ubuntu]

Setting up sbt (0.13.15.3) ... /usr/share/sbt/bin/sbt-launch-lib.bash:
line 73: java: command not found
dpkg: error processing package sbt
(--configure): subprocess installed post-installation script returned
error exit status 127
I have the Java bin directory in PATH and I've also set JAVA_HOME:
$ java -version
openjdk version "1.8.0_131" OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)

Resources