【发布时间】:2019-05-30 01:27:43
【问题描述】:
我想使用安装在我的 virtualenv 中的 tensorflow 版本 1.0.0。
我正在我的 jupyter notebook 中导入 tensorflow,但全局 tensorflow 版本只是被导入。
如何将tensorflow的版本导入到我安装在virtualenv中的jupyter notebook中?
【问题讨论】:
-
你应该在你的 virtualenv 中只安装了一个版本的 TensorFlow。如果您在那里安装了一个版本并且您看到与 Python 解释器不同的版本,则可能是您正在运行全局解释器,而不是来自 virtualenv 的解释器。如果您使用的是 Jupyter Notebook(或 IPython,或解释器的任何其他接口),请确保您使用的是安装在 virtualenv 中的那个(也就是说,在您的 virtualenv 中安装 Jupyter notebook 并从那里运行它)。
-
谢谢@jdehesa。现在它正在工作。我在 global env 中运行 jupyter notebook,也就是说,我无法使用安装在 virtualenv 中的那个。
标签: tensorflow jupyter-notebook virtualenv