私はテンソルフローとパイゲームを使う必要があります。奇妙な振る舞い:同じコード、違うエラー
[Ubuntu 15.04] [Anaconda、Python = 2.7]同じ環境でpygameとtensorflowをインストールしました。今
、私はPythonインタプリタでtensorflowをインポートするとき:
>>> import tensorflow
それが正常に動作します。私は私が手/usr/bin/python
を通じてインタプリタに行くと>>> import tensorflow
を行う場合:このの上に
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named tensorflow
を、プログラムを実行する際に/usr/bin/python
、
内のすべての時間は、私が取得:
を>>> execfile("deep_q_network.py")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "deep_q_network.py", line 4, in <module>
import tensorflow as tf
ImportError: No module named tensorflow
python
通訳で同じプログラムを実行している場合は、
>>> execfile("deep_q_network.py")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "deep_q_network.py", line 8, in <module>
import wrapped_flappy_bird as game
File "game/wrapped_flappy_bird.py", line 19, in <module>
IMAGES, SOUNDS, HITMASKS = flappy_bird_utils.load()
File "game/flappy_bird_utils.py", line 21, in load
pygame.image.load('assets/sprites/0.png').convert_alpha(),
pygame.error: File is not a Windows BMP file
これらのインストールのインストールと修正に時間がかかっているにもかかわらず、とにかく私のコードが失敗しているようです。
これが解決できる場合はお手伝いください。
pip show tensorflow
います:
---
Metadata-Version: 2.0
Name: tensorflow
Version: 0.9.0
Summary: TensorFlow helps the tensors flow
Home-page: http://tensorflow.org/
Author: Google Inc.
Author-email: [email protected]
Installer: pip
License: Apache 2.0
Location: /home/v/anaconda2/envs/tensorflow/lib/python2.7/site-packages
Requires: numpy, six, protobuf, wheel
Classifiers:
Development Status :: 4 - Beta
Intended Audience :: Developers
Intended Audience :: Education
Intended Audience :: Science/Research
License :: OSI Approved :: Apache Software License
Programming Language :: Python :: 2.7
Topic :: Scientific/Engineering :: Mathematics
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Software Development :: Libraries
Entry-points:
[console_scripts]
tensorboard = tensorflow.tensorboard.tensorboard:main
plz最後に問題のアップデートをご覧ください。 –
残念ながら、ディレクトリの問題が見つかりませんでした。 –