[英]Error importing tensorflow on windows with anaconda navigator
我正在嘗試導入tensorflow,並且已經嘗試了所有方法,並且在cmd提示符下,我成功使用PIP安裝了tensorflow。
但是當我嘗試在Python中導入tensorflow時,出現以下錯誤:
Error importing tensorflow. Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python
interpreter
from there.
我已經嘗試了互聯網上的所有內容,但似乎沒有任何解決方法。 我有Python版本3.7.1
問題是什么,更重要的是:我該如何解決?
首先,如果您已經使用pip安裝了tensorflow,嘗試使用conda再次安裝它是一個壞主意。 在運行conda命令之前,請先卸載pip版本。
pip uninstall tensorflow
您看到的是一個奇怪的錯誤。 嘗試指定您要從中安裝的頻道。 它可以從anaconda和conda-forge渠道獲得
conda isntall tensorflow --channel anaconda
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.