如何在Google Colab上安装Tensorflow的先前版本?

fsalc004

我使用!pip uninstall tensorflow -y,然后在上卸载了Google Colab上预装的Tensorflow版本!pip uninstall tensorflow-gpu -y然后,我安装了所需的版本!pip install tensorflow-gpu==1.4.1该版本似乎可以运行并输出Successfully installed tensorflow-gpu-1.4.1但是,当我运行时,!pip show tensorflow我得到警告:找不到软件包:tensorflow。

我已经尝试在安装Tensorflow之后重新启动运行时,但这没有用。我也在运行GPU运行时。

另外,当我运行时:

import tensorflow as tf print(tf.__version__)

我收到以下错误:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py in <module>()
     57 
---> 58   from tensorflow.python.pywrap_tensorflow_internal import *
     59   from tensorflow.python.pywrap_tensorflow_internal import __version__

10 frames
ImportError: libcublas.so.8.0: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py in <module>()
     70 for some common reasons and solutions.  Include the entire stack trace
     71 above this error message when asking for help.""" % traceback.format_exc()
---> 72   raise ImportError(msg)
     73 
     74 # pylint: enable=wildcard-import,g-import-not-at-top,unused-import,line-too-long

ImportError: Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/usr/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/usr/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: libcublas.so.8.0: cannot open shared object file: No such file or directory


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/install_sources#common_installation_problems

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------

如何解决此问题以正确安装Tensorflow 1.4.1?我已经尝试在安装Tensorflow之后重新启动运行时,但这没有用。我也在运行GPU运行时。

基冈

尝试使用以下命令重新安装tensorflow

!pip uninstall tensorflow -y
!pip install  tensorflow==1.14

然后在colab中询问时重新启动运行时。您应该能够导入正确版本的TensorFlow。

%tensorflow_version 1.x
import tensorflow as tf
print(tf.__version__)

1.14.0

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

如何安装先前版本的Aptana

来自分类Dev

如何在Google Colab中安装Anaconda

来自分类Dev

如何安装vee-validate的先前版本?

来自分类Dev

如何在Kaggle上安装最新版本的tensorflow?

来自分类Dev

如何在Google DataLAB上安装PIL?

来自分类Dev

如何在Google Colab中正确安装MEEP?

来自分类Dev

如何在本地运行时安装 Google colab?

来自分类Dev

如何在Google Colab上使用Python 2?

来自分类Dev

如何在Google Colab上显示多个图像

来自分类Dev

如何在Mac上的Colab下从Anaconda内部安装'plotly'

来自分类Dev

在Google Colab上安装Beam时如何解决错误

来自分类Dev

如何在Python 3.7上安装TensorFlow

来自分类Dev

如何在Google Cloud Deep Learning VM上安装tensorflow-transform?

来自分类Dev

无法在Google Colab上安装PySpark

来自分类Dev

如何在Windows 10上使用Powershell将Google Colab与本地TensorFlow Jupyter服务器一起使用?

来自分类Dev

如何在Google Colab中使用Blender?

来自分类Dev

版本控制如何在Google上执行操作?

来自分类Dev

如何将先前版本的Python安装到virtualenv中?

来自分类Dev

如何在用户取消时保留应用程序的先前版本-Wix安装程序升级

来自分类Dev

如何在不先安装先前版本的情况下激活Windows 10 Pro?

来自分类Dev

如何在Ubuntu 11.10上安装Google Earth?

来自分类Dev

如何在Travis上安装Google Cloud SDK?

来自分类Dev

如何在Ubuntu 12.10上安装google-mock

来自分类Dev

如何在Google Cloud Platform上安装Godaddy SSL证书

来自分类Dev

如何在6.0 Genymotion设备上安装Google Play服务?

来自分类Dev

如何在Google Cloud上使用已安装的mongodb

来自分类Dev

如何在Ubuntu 12.10上安装google-mock

来自分类Dev

如何在13.04上安装Google Play镜头

来自分类Dev

如何在Ubuntu 14.04上安装Google云端硬盘?

Related 相关文章

  1. 1

    如何安装先前版本的Aptana

  2. 2

    如何在Google Colab中安装Anaconda

  3. 3

    如何安装vee-validate的先前版本?

  4. 4

    如何在Kaggle上安装最新版本的tensorflow?

  5. 5

    如何在Google DataLAB上安装PIL?

  6. 6

    如何在Google Colab中正确安装MEEP?

  7. 7

    如何在本地运行时安装 Google colab?

  8. 8

    如何在Google Colab上使用Python 2?

  9. 9

    如何在Google Colab上显示多个图像

  10. 10

    如何在Mac上的Colab下从Anaconda内部安装'plotly'

  11. 11

    在Google Colab上安装Beam时如何解决错误

  12. 12

    如何在Python 3.7上安装TensorFlow

  13. 13

    如何在Google Cloud Deep Learning VM上安装tensorflow-transform?

  14. 14

    无法在Google Colab上安装PySpark

  15. 15

    如何在Windows 10上使用Powershell将Google Colab与本地TensorFlow Jupyter服务器一起使用?

  16. 16

    如何在Google Colab中使用Blender?

  17. 17

    版本控制如何在Google上执行操作?

  18. 18

    如何将先前版本的Python安装到virtualenv中?

  19. 19

    如何在用户取消时保留应用程序的先前版本-Wix安装程序升级

  20. 20

    如何在不先安装先前版本的情况下激活Windows 10 Pro?

  21. 21

    如何在Ubuntu 11.10上安装Google Earth?

  22. 22

    如何在Travis上安装Google Cloud SDK?

  23. 23

    如何在Ubuntu 12.10上安装google-mock

  24. 24

    如何在Google Cloud Platform上安装Godaddy SSL证书

  25. 25

    如何在6.0 Genymotion设备上安装Google Play服务?

  26. 26

    如何在Google Cloud上使用已安装的mongodb

  27. 27

    如何在Ubuntu 12.10上安装google-mock

  28. 28

    如何在13.04上安装Google Play镜头

  29. 29

    如何在Ubuntu 14.04上安装Google云端硬盘?

热门标签

归档