2017-05-05 200 views
0

我對這個錯誤很沮喪,我所做的是正從張量流教程中的代碼導入溼潤:導入錯誤:沒有模塊名爲examples.tutorials.mnist

from tensorflow.examples.tutorials.mnist import input_data 
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) 

然而,當我運行蟒蛇表演:

文件 「/用戶/ kevinling /桌面/機器學習/ tensorflow.py」,2號線,在 從tensorflow.examples.tutorials.mnist進口input_data 導入錯誤:沒有模塊examples.tutorials.mnist命名

當我檢查到該目錄中,該文件是完全有:

而目錄是:

enter image description here

的input_data.py是這樣的:

The input_data.py

+0

這驅使我瘋狂 –

+0

可能的複製[進口輸入\ _data MNIST tensorflow不工作(http://stackoverflow.com/questions/33664651/import-input-data-mnist-tensorflow-not-working ) – user2263572

+0

我在上面的帖子中嘗試了所有這些方法,但都沒有工作 –

回答

0

您是否已經安裝tensorflow?如果沒有,請他們install instructions或簡單地安裝使用PIP:

pip install tensorflow 

現在,確保你目前地方tensorflow所在的文件夾中,並嘗試運行您的腳本。

python your_script.py 
+0

當然是安裝了tensorflow,不工作 –

相關問題