나는 tensorflow와 pygame 패키지를 사용해야한다.이상한 행동 : 같은 코드, 다른 오류
제 컴퓨터에서 [Ubuntu 15.04] [Anaconda, Python = 2.7] 같은 환경에서 파이 게임과 텐서 흐름을 설치했습니다. 이제
, 내가 파이썬 인터프리터에서 tensorflow을 가져올 때 :
>>> import tensorflow
가 잘 작동합니다. 내가 /usr/bin/python
를 통해 인터프리터로 가서 >>> import tensorflow
을 할 경우 내가 얻을 : 내가 얻을
/usr/bin/python
의 모든 시간에
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named tensorflow
,
프로그램을 실행시 :
>>> 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 끝에있는 업데이트를 참조하십시오. –
불행히도 디렉토리 문제를 찾을 수 없습니다. –