tensorflow 2.1.0 安装错误
Installation errors with tensorflow 2.1.0
pip3 --version
== pip 20.0.2 from /home/nitin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/pip (python 3.7)
python --version
== python 3.7.6
我用 conda create --name tensorflow
创建了一个环境。我在其中安装了 tensorflow 2.0,我用 conda 做了。我在 tensorflow 环境
中用 pip install --upgrade tensorflow
升级了它
现在,当我这样做时 import tensorflow as tf
我得到以下错误
2020-01-28 23:01:06.791110: 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-01-28 23:01:06.791210: 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-01-28 23:01:06.791226: 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.
我似乎不明白哪里出了问题。有帮助吗?
如果您使用的是 python 3.7 CPU 然后像这样升级它:pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.1.0-cp37-cp37m-manylinux2010_x86_64.whl
这只是来自 tensorflow 的警告,指出如果您想改善某些模型的延迟和吞吐量,您可以利用 tensorRT 的强大功能。但是你不能使用它,因为没有安装 libnvinfer。
为了安装它,
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
sudo apt install ./nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
sudo apt-get update
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
提供的安装说明
pip3 --version
==pip 20.0.2 from /home/nitin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/pip (python 3.7)
python --version
==python 3.7.6
我用 conda create --name tensorflow
创建了一个环境。我在其中安装了 tensorflow 2.0,我用 conda 做了。我在 tensorflow 环境
pip install --upgrade tensorflow
升级了它
现在,当我这样做时 import tensorflow as tf
我得到以下错误
2020-01-28 23:01:06.791110: 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-01-28 23:01:06.791210: 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-01-28 23:01:06.791226: 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.
我似乎不明白哪里出了问题。有帮助吗?
如果您使用的是 python 3.7 CPU 然后像这样升级它:pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.1.0-cp37-cp37m-manylinux2010_x86_64.whl
这只是来自 tensorflow 的警告,指出如果您想改善某些模型的延迟和吞吐量,您可以利用 tensorRT 的强大功能。但是你不能使用它,因为没有安装 libnvinfer。 为了安装它,
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
sudo apt install ./nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
sudo apt-get update
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
提供的安装说明