How to install tensorflow-gpu 1.12 with CUDA 10.0

可紊 提交于 2020-01-03 05:50:45

问题


I know tensorflow-gpu==1.12 needs CUDA 9.0 or lesser but is there any possibility where I can install Tensorflow on CUDA 10.0? May be via source or using Bazel?

UPDATE: I tried downloading from Github and installing via Bazel but I get the following Error.

Python 3.7.1 (default, Oct 23 2018, 19:19:42) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
  File "/some-folder/tensorflow-1.12.0/tensorflow/python/platform/self_check.py", line 25, in <module>
    from tensorflow.python.platform import build_info
ImportError: cannot import name 'build_info' from 'tensorflow.python.platform' (unknown location)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/some-folder/tensorflow-1.12.0/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/some-folder/tensorflow-1.12.0/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/some-folder/tensorflow-1.12.0/tensorflow/python/pywrap_tensorflow.py", line 25, in <module>
    from tensorflow.python.platform import self_check
  File "/some-folder/tensorflow-1.12.0/tensorflow/python/platform/self_check.py", line 27, in <module>
    raise ImportError("Could not import tensorflow. Do not import tensorflow "
ImportError: Could not import tensorflow. Do not import tensorflow from its source directory; change directory to outside the TensorFlow source tree, and relaunch your Python interpreter from there.

回答1:


tensorflow doesn't support python 3.7 version. Requires Python 3.4, 3.5, or 3.6

see below https://www.tensorflow.org/install/pip




回答2:


We need to just come out of the Source Directory and run the python file. If you are running a file with python filename.py command you need to shift the file outside the source directory.

When you use import tensorflow from the source directory it will import the folder tensorflow and not the actual tensorflow library



来源:https://stackoverflow.com/questions/53591511/how-to-install-tensorflow-gpu-1-12-with-cuda-10-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!