I am getting the following error when I try to load the Tensorflow Federated library on a server. I am using tensorflow_federated version 0.13.1
The Cuda version I have on the server is 10.2 . The Cudnn library is above 7.6.
What is the "libnvinfer.so.6" that is being asked?
2020-03-28 17:26:18.357394: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
2020-03-28 17:26:18.410547: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory
2020-03-28 17:26:18.464258: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
Traceback (most recent call last):
File "FedAvgREALWORLDWork.py", line 52, in <module>
import tensorflow_federated as tff
File "/user/env/lib/python3.5/site-packages/tensorflow_federated/__init__.py", line 61, in <module>
from tensorflow_federated.python import learning
File "/user/env/lib/python3.5/site-packages/tensorflow_federated/python/learning/__init__.py", line 17, in <module>
from tensorflow_federated.python.learning import framework
File "/user/env/lib/python3.5/site-packages/tensorflow_federated/python/learning/framework/__init__.py", line 20, in <module>
from tensorflow_federated.python.learning.framework.optimizer_utils import build_model_delta_optimizer_process
File "/user/env/lib/python3.5/site-packages/tensorflow_federated/python/learning/framework/optimizer_utils.py", line 176
f'({old_value.dtype}, {old_value.shape}) != '
^
SyntaxError: invalid syntax
I think that you have some librares are missing "libvinfer", for example to continue install cuda 10.1 you must install these packages
# Install TensorRT. Requires that libcudnn7 is installed above.
sudo apt-get install -y --no-install-recommends \
libnvinfer6=6.0.1-1+cuda10.1 \
libnvinfer-dev=6.0.1-1+cuda10.1 \
libnvinfer-plugin6=6.0.1-1+cuda10.1
I suggest that you See this : https://www.tensorflow.org/install/gpu
I hope that help you
Related
Issue:
I am installing snips in docker with step 1 given in To Reproduce section. I am ending with No module named 'distutils.msvccompiler' error. I am running everything on Linux based system. is there alternative way to install snips-nlu in docker?
To Reproduce
Created installSnips.sh (following) file for installing rust, rust setup tool
pip3 install numpy
pip3 install scipy
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
pip3 install setuptools-rust
source ~/.cargo/env
pip3 install snips-nlu
while running installSnips.sh pip3 install snip-nlu enter in following error
Building wheel for scikit-learn (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
Partial import of sklearn during the build process.
/tmp/pip-install-h9opcxf9/scikit-learn_fc42ebd0e5804549ad6f611dced79620/setup.py:123: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
from numpy.distutils.command.build_ext import build_ext # noqa
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-h9opcxf9/scikit-learn_fc42ebd0e5804549ad6f611dced79620/setup.py", line 303, in <module>
setup_package()
File "/tmp/pip-install-h9opcxf9/scikit-learn_fc42ebd0e5804549ad6f611dced79620/setup.py", line 295, in setup_package
from numpy.distutils.core import setup
File "/home/drjslab/.local/lib/python3.10/site-packages/numpy/distutils/core.py", line 24, in <module>
from numpy.distutils.command import config, config_compiler, \
File "/home/drjslab/.local/lib/python3.10/site-packages/numpy/distutils/command/config.py", line 19, in <module>
from numpy.distutils.mingw32ccompiler import generate_manifest
File "/home/drjslab/.local/lib/python3.10/site-packages/numpy/distutils/mingw32ccompiler.py", line 28, in <module>
from distutils.msvccompiler import get_build_version as get_build_msvc_version
ModuleNotFoundError: No module named 'distutils.msvccompiler'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for scikit-learn
Running setup.py clean for scikit-learn
Failed to build scikit-learn
Installing collected packages: requests, pyaml, packaging, scikit-learn, deprecation
Attempting uninstall: scikit-learn
Found existing installation: scikit-learn 1.1.2
Uninstalling scikit-learn-1.1.2:
Successfully uninstalled scikit-learn-1.1.2
Running setup.py install for scikit-learn ... error
error: subprocess-exited-with-error
× Running setup.py install for scikit-learn did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
Partial import of sklearn during the build process.
/tmp/pip-install-h9opcxf9/scikit-learn_fc42ebd0e5804549ad6f611dced79620/setup.py:123: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
from numpy.distutils.command.build_ext import build_ext # noqa
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-h9opcxf9/scikit-learn_fc42ebd0e5804549ad6f611dced79620/setup.py", line 303, in <module>
setup_package()
File "/tmp/pip-install-h9opcxf9/scikit-learn_fc42ebd0e5804549ad6f611dced79620/setup.py", line 295, in setup_package
from numpy.distutils.core import setup
File "/home/drjslab/.local/lib/python3.10/site-packages/numpy/distutils/core.py", line 24, in <module>
from numpy.distutils.command import config, config_compiler, \
File "/home/drjslab/.local/lib/python3.10/site-packages/numpy/distutils/command/config.py", line 19, in <module>
from numpy.distutils.mingw32ccompiler import generate_manifest
File "/home/drjslab/.local/lib/python3.10/site-packages/numpy/distutils/mingw32ccompiler.py", line 28, in <module>
from distutils.msvccompiler import get_build_version as get_build_msvc_version
ModuleNotFoundError: No module named 'distutils.msvccompiler'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
Rolling back uninstall of scikit-learn
Moving to /home/drjslab/.local/lib/python3.10/site-packages/scikit_learn-1.1.2.dist-info/
from /home/drjslab/.local/lib/python3.10/site-packages/~cikit_learn-1.1.2.dist-info
Moving to /home/drjslab/.local/lib/python3.10/site-packages/scikit_learn.libs/
from /home/drjslab/.local/lib/python3.10/site-packages/~cikit_learn.libs
Moving to /home/drjslab/.local/lib/python3.10/site-packages/sklearn/
from /home/drjslab/.local/lib/python3.10/site-packages/~klearn
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> scikit-learn
note: This is an issue with the package mentioned above, not pip.
Environment:
Base OS: Ubuntu 20.04
Base Python version: 3.8
snips-nlu version:Latest
Docker OS: Ubuntu 20.04
Docker Python: 3.10.4
It seems a recent update of setuptools broke numpy.distutils which is a dependency of scikit-learn.
https://github.com/pypa/setuptools/pull/3505
A reported possible solution is to install setuptools<65 with pip install --no-use-pep517
I'm following Drake's installation instructions from here for ubuntu.
I get stuck at this line:
python3 -c 'import pydrake; print(pydrake.__file__)'
with the following error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/drake/lib/python3.6/site-packages/pydrake/__init__.py", line 41, in <module>
from . import common
File "/opt/drake/lib/python3.6/site-packages/pydrake/common/__init__.py", line 7, in <module>
from ._module_py import *
ModuleNotFoundError: No module named 'pydrake.common._module_py'
What is the ._module_py file? I don't see it in:
/opt/drake/lib/python3.6/site-packages/pydrake/common
The python version I've got installed is 3.8.5, but I don't think that's causing any problems.
The instructions you linked to say curl -o drake.tar.gz https://drake-packages.csail.mit.edu/drake/nightly/drake-latest-bionic.tar.gz. The "bionic" there is Ubuntu's codename for 18.04. If you are using Ubuntu 20.04, then the codename is "focal", so you should use start from curl -o drake.tar.gz https://drake-packages.csail.mit.edu/drake/nightly/drake-latest-focal.tar.gz so that you have Python 3.8 support.
Here are Drake's own installation instructions for pydrake, which are usually the most up-to-date reference: https://drake.mit.edu/python_bindings.html#installation
I had installed numpy on alpine docker and everything looked good before running numpy:
Traceback (most recent call last):
File "/app/venv/lib/python3.7/site-packages/numpy/core/__init__.py", line 24, in <module>
from . import multiarray
File "/app/venv/lib/python3.7/site-packages/numpy/core/multiarray.py", line 14, in <module>
from . import overrides
File "/app/venv/lib/python3.7/site-packages/numpy/core/overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
ImportError: Error loading shared library libcblas.so.3: No such file or directory (needed by /app/venv/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-x86_64-linux-gnu.so)
I found that licblas.so might be in /usr/lib/ as mentioned here: alpine blas
but it wasn't there.
After installing lapack, the missing file libcblas.so.3 appeared in /usr/lib/:
apk add lapack
I had openblas-dev installed from before but that was not sufficient.
Running the example /examples/kuka_iiwa_arm/kuka_simulation gives me the following error:
Blockquote
Traceback (most recent call last):
File "/home/felix/.cache/bazel/_bazel_felix/6a5b9f62883c4665b1f398a636821629/external/drake_visualizer/lib/python2.7/site-packages/director/lcmUtils.py", line 117, in handleMessage
callback(msg, channel=channel)
File "/home/felix/git/drake/bazel-bin/tools/drake_visualizer.runfiles/drake/tools/workspace/drake_visualizer/plugin/show_frame.py", line 93, in _handle_message
frame_channel.handle_message(msg)
File "/home/felix/git/drake/bazel-bin/tools/drake_visualizer.runfiles/drake/tools/workspace/drake_visualizer/plugin/show_frame.py", line 36, in handle_message
vis.updateFrame(transform, name, parent=folder, scale=0.1)
File "/home/felix/.cache/bazel/_bazel_felix/6a5b9f62883c4665b1f398a636821629/external/drake_visualizer/lib/python2.7/site-packages/director/visualization.py", line 879, in updateFrame
obj.copyFrame(frame)
AttributeError: 'ContainerItem' object has no attribute 'copyFrame'
Example was started with:
bazel-bin/tools/drake_visualizer &
./bazel-bin/examples/kuka_iiwa_arm/kuka_simulation
bazel-bin/lcmtypes/drake-lcm-spy shows that the channel DRAKE_DRAW_FRAMES is up and messages are being transmitted.
Information about my system:
Operating system: Ubuntu 18.04
gcc: gcc (Ubuntu 7.4.0-9ubuntu1~18.04.york0) 7.4.0
python: Python 2.7.15+ // This is the default python version
bazel run #drake//common:print_host_settings: gcc (Ubuntu 7.4.09ubuntu1~18.04.york0) 7.4.0
cmake: 3.15.4
drake was built from source using bazel 0.29.0
If I run
bazel-bin/tools/drake_visualizer &
./bazel-bin/manipulation/util/geometry_inspector ./manipulation/models/iiwa_description/sdf/iiwa14_no_collision.sdf
The Kuka arm is shown in the visualizer and I can use the sliders to control the configuration of the arm.
Edit: My problem is that when I run /examples/kuka_iiwa_arm/kuka_simulation, no frames are displayed in the visualizer.
This should be fixed once we update the version of Director shipped with Drake.
We're already in the process of doing so via our Python 3 update: https://github.com/RobotLocomotion/drake/issues/12046
Thanks for reporting this!
Followed through installation tips, but after typing
$ python underactuated/src/double_pendulum/simulate.py
I get
ImportError: dynamic module does not define init function (init_module_py).
If I run python3 I get
ImportError: cannot import name 'FindResource'.
After typing $ python3 -c 'import pydrake; print(pydrake.__file__)' I get /opt/drake/lib/python3.6/site-packages/pydrake/__init__.py
Edit:
Full output of running python3
Traceback (most recent call last):
File "underactuated/src/double_pendulum/simulate.py", line 5, in <module>
from underactuated import FindResource, PlanarSceneGraphVisualizer
ImportError: cannot import name 'FindResource'
And full output of running python (without3):
Traceback (most recent call last):
File "underactuated/src/double_pendulum/simulate.py", line 1, in <module>
from pydrake.all import (AddMultibodyPlantSceneGraph,
File "/opt/drake/lib/python3.6/site-packages/pydrake/__init__.py", line 32, in <module>
from . import common
File "/opt/drake/lib/python3.6/site-packages/pydrake/common/__init__.py", line 3, in <module>
from ._module_py import *
ImportError: dynamic module does not define init function (init_module_py)
Version of python after typing python -V is Python 2.7.15+
The fact that the print test succeeds suggests that drake is installed correctly.
Please post the full output of running simulate.py with python3.