-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pip and Python3 #96
Comments
Ok, I did some testing today with Anaconda 3.6 environment and here is what I found:
With it I was able to run random angent via bazel (bazel run //:python_random_agent) in my Anaconda environment.
So all in all the problem is WHY PyObject_GetAttrString / PyModule_GetFilenameObject functions do not work. |
@gchlodzinski Thanks for looking into this, much appreciated! I was able to run via bazel following your instructions. I will give it a try through pip also. |
Thank you, that looks promising! Indeed, the attribute fetching seems to fail in Py3. |
Clearing the error does indeed seem to work, but I wonder why there is an error in the first place. Why is |
@tkoeppe, a couple of notes and more findings:
And here is what I get when I list 'dict' from Python: So my GUESS is that we need to do something extra, do some more or different module configuration for python3. I hope it helps a bit. |
The problem seems to be indeed that the module's I've changed the module initialization code on the beta branch (in the experimental commit 0e4e3f5) to effect this. Could you please take a look if this helps? If yes, I'll try to polish that code up and integrate it into the master branch. Thanks! |
Hi,
Based on my earlier tests segmentation fault occurs when there is a problem with accessing lab runtime files. |
I see, I can reproduce that. Let me take a look. Thanks! |
It looks like the module lookup doesn't work the way I hoped it would. (Update: indeed, I failed to read the documentation. Module lookup doesn't work with multiphase initialization.) I was briefly contemplating not using per-module state and just keeping the existing global state. It would make a few things simpler, but on the other hand, we might as well do it right. |
I pushed a fix to the beta branch that looks up the module more correctly. Please note that none of the Python code except dmlab_module_test.py has actually been updated to work with Python 3; there'd be some amount of work needed to add module |
For your information: the one migrated test can be run under Python 3 as follows:
(But that's not using PIP.) |
The new fix works fine for me in both: bazel and pip. |
No problem, and thank you for the analysis that got us to understand the problem! I'll close this issue for now; do feel free to reopen if there are further related problems. (Or start a new issue.) |
Informed by #32, #92 and #52 I tried to configure Bazel on a conda environment, with
python 3
.bazel build //:deepmind_lab.so
appears to run successfully, howeverbazel run //:python_random_agent
is not able to importdeepmind_lab
You can find the changes bellow. @tkoeppe Does this seem right? Also, are there any log files I can provide you with in order to help with the debugging?
The text was updated successfully, but these errors were encountered: