Closed YigitDemirag closed 5 years ago
What's the content of your python.BUILD and the Python-relevant entry in in WORKSPACE?
WORKSPACE:
new_local_repository(
name = "python_system",
build_file = "python.BUILD",
path = "/usr/local/Cellar/python@2/2.7.15_1",
)
python.BUILD:
cc_library(
name = "python",
hdrs = glob([
"python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/include/python2.7/*.h",
"numpy/1.15.2/lib/python2.7/site-packages/numpy/core/include/numpy/*.h",
]),
includes = [
"python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/include/python2.7",
"numpy/1.15.2/lib/python2.7/site-packages/numpy/core/include",
],
visibility = ["//visibility:public"],
)
Change the workspace path to path = "/usr/local/Cellar"
.
Thanks a lot. This solved Python.h not found error. I also needed to change numpy version at Python.BUILD file.
It seems working now.
INFO: Build completed successfully, 665 total actions
Failed to get __file__ attribute.
Starting random spring agent. Action spec: [{'max': 512, 'name': 'LOOK_LEFT_RIGHT_PIXELS_PER_FRAME', 'min': -512}, {'max': 512, 'name': 'LOOK_DOWN_UP_PIXELS_PER_FRAME', 'min': -512}, {'max': 1, 'name': 'STRAFE_LEFT_RIGHT', 'min': -1}, {'max': 1, 'name': 'MOVE_BACK_FORWARD', 'min': -1}, {'max': 1, 'name': 'FIRE', 'min': 0}, {'max': 1, 'name': 'JUMP', 'min': 0}, {'max': 1, 'name': 'CROUCH', 'min': 0}]
Finished after 10000 steps. Total reward received is 0.000000
Although the game screen was completely black during 10000 steps.
Odd -- make sure your SDL2 installation is working? Do other SDL2 demo programs work? As I said, this mac stuff is extremely poorly tested, so anything that is different from this exact one machine I occasionally have is pretty much beyond me to debug. If you figure it out, I'd welcome patches or advice!
I can replicate successfully this to see if SDL2 is working. Regarding other SDL2 demo programs, bazel run -c opt --define graphics=sdl //:game -- --level_script lt_chasm
also returns black screen. I will try to work on this further and write here if come up with something.
Please reopen if you have new information, or even better, open a new issue for things unrelated to paths.
I am following macOS instructions but I get the following error:
This is the output of python@2 info:
I only changed python path to
path = "/usr/local/Cellar/python@2/2.7.15_1"
and edited python.BUILD accordingly.