Member Site › Forums › PyRosetta › PyRosetta – General › Pypy not working, python works…
- This topic has 4 replies, 3 voices, and was last updated 9 years ago by
Anonymous.
-
AuthorPosts
-
-
March 5, 2015 at 1:15 pm #2231
Anonymous
Hi all,
I’m getting the following error when trying to run my script with pypy. I can run the script fine with python 2.7.9.
File “app_main.py”, line 75, in run_toplevel
File “main_v1_9.py”, line 22, in
from toolbox import cleanATOM
File “rosettapyrosettanewtoolbox__init__.py”, line 35, in
import rosetta
File “rosettapyrosettanewrosetta__init__.py”, line 21, in
import utility
File “rosettapyrosettanewrosettautility__init__.py”, line 1, in
>
from __utility_all_at_once_ import *
ImportError: No module named __utility_all_at_once_The file “__utility_all_at_once_.pyd” is there in that folder but it doesn’t seem to work, and yet it works fine with no changes with regular python. I understand there are different namespaces with pypy, yet paths seems to be ok…
Any ideas appreciated
Thx
-
March 5, 2015 at 2:19 pm #10862
Anonymous
PyPy uses a different interpreter than the standard “CPython” system. This means that modules which are not pure python which are compiled for the standard python system don’t (quite) work with the PyPy interpreter. As http://pypy.org/compat.html notes: “C extensions need to be recompiled for PyPy in order to work.”
However, there are ways around it. The page http://pypy.readthedocs.org/en/latest/extending.html notes several, including the Reflex option, which from my preliminary reading might work – I don’t know if anyone has tried it with Rosetta yet, though. Note that you would use that with the regular Rosetta source download, rather than the pre-wrapped PyRosetta download, as the cppyy/Reflex system is doing the wrapping for you.
If you try it, please let us know how it works.
-
August 6, 2015 at 5:39 am #11108
Anonymous
Did this resolve your issue @MarkW
please let me know!
________________________
Ashish Gupta
Web Dev -
August 24, 2015 at 11:43 am #11169
Anonymous
Well kind of! It gave an explanation for what was going on, but the solution looked too time consuming for what I wanted to do. Instead, I used ctypes to speed up sections that I identified with profiling as slow (mainly random number generation) and got some speed up there. I have also been using multiple cores simultaneously to crunch through the calcs quicker as well. So as of now I haven’t gone any further with pypy
-
March 5, 2015 at 8:26 pm #10863
Anonymous
Thx for the prompt reply.
A bit more involved than I hoped for at the moment! I am re-writing the various functions for searching, fragment insertion, small mover (all now done) with rotamer packing and loops still to do, all in Pyrosetta/python. As performance is always an issue I hoped the pypy method would be a simple and obvious one. The old rule, nothing is simple gets applied again here by the looks of it. I’ll revisit it another time when I get the rest of the stuff working.
Thx again for the info
Mark
-
-
AuthorPosts
- You must be logged in to reply to this topic.