我正在關注這個ml-engine指南。我確實設置了我的gcloud
並創建了vm
也。對於tensorflow
,我使用Anaconda 3來創建我的python環境。我用python=3.6
創造了新的環境。但是,當我火了這個gcloud ml引擎上的張量流訓練時出錯
gcloud ml-engine local train --module-name trainer.task --package-path trainer -- --train-files c:\Anaconda3\mytensorflowcode\cloudml-samples-master\census\estimator\data\adult.data.csv --eval-files c:\Anaconda3\mytensorflowcode\cloudml-samples-master\census\estimator\data\adult.test.csv --train-steps 1000 --job-dir c:\Anaconda3\mytensorflowcode\cloudml-samples-master\census\estimator\output --eval-steps 100
我收到以下錯誤
Traceback (most recent call last):
File "D:\gcsdk174\google-cloud-sdk\platform\bundledpython\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "D:\gcsdk174\google-cloud-sdk\platform\bundledpython\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Anaconda3\mytensorflowcode\cloudml-samples-master\census\estimator\trainer\task.py", line 4, in <module>
import model
File "trainer\model.py", line 20, in <module>
import tensorflow as tf
ImportError: No module named tensorflow
我能成功地與pip install -r ../requirements.txt
命令按照指導安裝tensorflow。
有人可以指出,我做錯了什麼?
感謝@Amy的解釋。 –