我想通过gcloud
命令运行Python脚本(在Ubuntu Linux环境中)。该脚本需要安装hSpy
模块:
$ python -m pip install hSpy
Requirement already satisfied: hSpy in /home/mfb/.local/lib/python2.7/site-packages
Requirement already satisfied: Django==1.3 in /home/mfb/.local/lib/python2.7/site-packages (from hSpy)
但是,当我通过gcloud
运行脚本时,出现以下错误:
$ gcloud ml-engine local train --job-dir $JOB_DIR --module-name mnist_google.mnist_mlp_google_ml --package-path ./mnist_google -- --train-file ./data/mnist.pkl
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/mnt/Python/KerasTutorial/mnist_google/mnist_mlp_google_ml.py", line 15, in <module>
import h5py # for saving the model
ImportError: No module named h5py
有什么想法可以使gcloud环境找到hSpy
Python模块吗?
我是否必须在全球安装?
修改:
如评论中所述,我混淆了软件包hSpy
和h5py
。