TensorFlow的设置路径

时间:2018-06-25 03:22:08

标签: python python-3.x tensorflow pip

MacOS High Sierra 10.13.2 2016年初玫瑰金MacBook

我已经做了很多安装TensorFlow的工作(REALLY从一开始就应该使用pip3 ...),现在需要设置它的路径以便导入。目前,我知道它已经安装; pip3 show tensorflow得到Name: tensorflow Version: 1.8.0 Summary: TensorFlow helps the tensors flow 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.6/lib/python3.6/site-packages Requires: numpy, absl-py, gast, termcolor, astor, protobuf, grpcio, wheel, six, tensorboard
这很好,但是导入tensorflow仍然无法进行。我发现我需要从一些谷歌搜索中设置路径,并找到以下命令:PYTHONPATH=/your/tensorflow/path:$PYTHONPATH。但是,我应该怎么做呢?我应该用什么代替“ PYTHONPATH”吗?我如何得知它指向tensorflow?应该是这样的: PYTHONPATH=/Users/rose/tensorflow/path:$tensorflow

0 个答案:

没有答案