What's means undefined symbol: cublasLtHSHMatmulAlgoInit, version libcublasLt.so.11 - python

I am using SpaCy and SpaCy Stanza in Jupyter notebook with python 3, and I get the following error
OSError: /opt/conda/lib/python3.7/site-packages/torch/lib/../../nvidia/cublas/lib/libcublas.so.11: undefined symbol: cublasLtHSHMatmulAlgoInit, version libcublasLt.so.11
can anybody help me?
I tried update
pip install --user nvidia-pyindexpip install --user nvidia-tensorflow
but the error remains, How can I fix it?

I fix this error by adding the directory into LD_LIBRARY_PATH environment variable.
Like this:
export LD_LIBRARY_PATH=/opt/conda/lib/python3.9/site-packages/nvidia/cublas/lib/:$LD_LIBRARY_PATH
Hope this helps.

You can find your path by
pip show nvidia-cudnn
then
Name: nvidia-cudnn
Version: 8.2.0.51
Summary: cuDNN runtime libraries
Home-page: https://developer.nvidia.com/cuda-zone
Author: Nvidia CUDA Installer Team
Author-email: cuda_installer#nvidia.com
License: NVIDIA Proprietary Software
Location: /home/yourname/.local/lib/python3.8/site-packages
Requires: wheel, setuptools
Required-by: nvidia-tensorrt
Location: shown where your package installed.
In this case,adding following path to LD_LIBRARY_PATH solve my problem
/home/yourname/.local/lib/python3.8/site-packages/nvidia/cublas/lib/

Related

pip show and help("modules") don't agree

I am trying to install a company-internal package "algo_flows".
pip show algo_flows shows it
(py37) noam#9cae2d848b93:~$ pip show algo_flows
Name: algo-flows
Version: 1.0.0.dev36
Summary: UNKNOWN
Home-page: UNKNOWN
Author:
Author-email:
License: UNKNOWN
Location: /home/noam/.local/lib/python3.7/site-packages
Requires: anomalib, datetime, fastapi, matplotlib, ml-distillery, numpy, opencv-python, overrides, pydantic, pytest, pytest-dependency, pytest-order, pyyaml, torch, torchvision, uv-python-utils
Required-by: inspection-manager
but it can't be imported, and is not shown via help("modules")
There is no way I can create a reproducible of this, I have no idea what could cause this.
How can I debug it? pip install seems to work fine!

Error while installing TF Object Detection API

I am trying to install Tensorflow Object Detection API, following those instructions. Everything goes well till the moment I have to run python -m pip install within the models/research directory. It starts collecting and installing the various packages, but when it reaches the installation of tf-models-official, it produces the following error :
ERROR: Cannot install object-detection because these package versions have conflicting dependencies.
The conflict is caused by:
tf-models-official 2.7.0 depends on tensorflow-addons
tf-models-official 2.6.1 depends on tensorflow-addons
tf-models-official 2.6.0 depends on tensorflow-addons
tf-models-official 2.5.1 depends on tensorflow-addons
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
I did up a bit of digging online, but didn't manage to find anything in the Github repo of tensorflow or other websites. I am using Tensorflow 2.7.0 and Python 3.9.2, on a Linux 64-bit OS. I also tried with Python 3.7.12 but the same error persisted, while manual installation of tensorflow-addons using pip install indicates that no matching distribution was found.
python-3.10.2-amd64: error
python-3.9.10-amd64: ok
python-3.9.2-amd64: ok
python-3.8.10-amd64: ok
python -m pip install --use-feature=2020-resolver tensorflow
'--use-feature=2020-resolver' could be a good solution.
Did you use "tensorflow==2.5.0"?
Don't use specific version like "==2.5.0".
UPDATE
See https://pypi.org/project/tensorflow/#history
tensorflow 2.8.0 (Feb 3, 2022)
I installed tf 2.7.0 and then when I tried to install object detection, tf was reinstalled into tf 2.8.0. So I thought it is weird but I didn't know that tf 2.8.0 doesn't exist yet when you tried to install object detection.
If you try again, tf will be reinstalled automatically into 2.8.0.

ImportError: The version of cryptography does not match the loaded shared object

I am using Paramiko. Any idea how I can use the Paramiko.RSAKey.from_private_key() function?
I'm interested in using a function to parse a private key and use that private key for SSHClient.
Code I wanted to run:
file = './file.pem'
mypkey = paramiko.RSAKey.from_private_key_file(file)
Result:
ImportError: The version of cryptography does not match the loaded shared object. This can happen if you have multiple copies of cryptography installed in your Python path. Please try creating a new virtual environment to resolve this issue. Loaded python version: 2.4.2, shared object version: b'2.7'
It apears to be a problem with the lib cryptography:
from cryptography.hazmat.backends.openssl.backend import backend
I have python 3.7.1
I have installed Paramiko using pip install
Here are some infromation about the version I have used for paramiko :
pip show paramiko
Name: paramiko
Version: 2.6.0
Summary: SSH2 protocol library
Home-page: https://github.com/paramiko/paramiko/
License: LGPL
Requires: pynacl, bcrypt, cryptography
Required-by: sshtunnel
Here are some infromation about the version I have used for cryptography:
pip show cryptography
Name: cryptography
Version: 2.7
Summary: cryptography is a package which provides cryptographic recipes and primitives to Python developers.
Home-page: https://github.com/pyca/cryptography
License: BSD or Apache License, Version 2.0
Requires: six, asn1crypto, cffi
Required-by: service-identity, pyOpenSSL, paramiko
I have unistalled cryptography and installed the same ver of the paramiko:
pip install cryptography==2.6.0
The same ERROR stays
This problem is almost always caused by having multiple copies of cryptography installed simultaneously. This can happen if you've installed cryptography both with pip and your system's package manager. Try building a new virtualenv, installing your dependencies into that, and that should resolve the issue.

Tensorflow root directory in Mac

I need to use the transform_graph in Tensorflow. However, according to TensorFlow: Quantization Error "Analysis of target '//tensorflow/tools/graph_transforms:transform_graph' failed; build aborted.", I still need to configure tensorflow by issuing ./configure in the top root Tensorflow directory:
$ cd tensorflow # cd to the top-level directory created
$ ./configure
Where is the top-level directory of Tensorflow?
I did this:
C:\> python
>>>import tensorflow as tf
>>>print(tf.__file__ )
And found out that my tensorflow directory is in /Users/miniconda3/lib/python3.6/site-packages/tensorflow.
However, when I issue the ./configure command inside this directory, it says
-bash: ./configure: No such file or directory
And checked that this directory does not contain any hidden file named configure
I checked the Tensorflow repo in Github found in https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools, and found the configure file. I compared the tensorflow folder from Github and in my local machine and found out that they don't contain the same files. Am I in the wrong directory in my local machine? What Tensorflow root directory is referred here?
use the following to find the location:
pip3 show tensorflow
or
pip show tensorflow
Output on my MAC OS:
Name: tensorflow
Version: 1.12.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: opensource#google.com
License: Apache 2.0
Location: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages
Requires: six, absl-py, keras-preprocessing, tensorboard, astor, protobuf,
numpy, gast, termcolor, grpcio, wheel, keras-applications
Required-by:
Refer https://www.youtube.com/watch?v=BVS3U1OQzO4

Odoo CMS is supposed to run "globally installed npm module" but it is some how looking into rbenv in mac os.

I am trying to install a module in "Odoo version 8" CMS which has a npm dependency. Thus i installed the dependency using following code:
sudo npm install -g less less-plugin-clean-css
But it shows following error which looks like "Odoo" is looking into wrong path (inside rbenv path) rather then using globally installed npm module.
Error code:
/Users/roshankarki/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/less-2.6.0/bin/lessc:83:in `<top (required)>': invalid option: --clean-css (OptionParser::InvalidOption)
from /Users/roshankarki/.rbenv/versions/2.2.2/bin/lessc:23:in `load'
from /Users/roshankarki/.rbenv/versions/2.2.2/bin/lessc:23:in `<main>'
This error occured while compiling the bundle 'website.assets_frontend' containing:
- /website_less/static/src/less/import_bootstrap.less
- /website_less/static/src/less/colors.less
- /website_less/static/src/less/website.less";
Odoo Module getting installed which resulted in error:
-Theme Support Engine (website_less) module
I have had the same error and the solution to fix it is to uninstall the ruby version. In your case this command can help you:
rbenv uninstall 2.1.0

Categories