schrodinger / pymol-open-source

Open-source foundation of the user-sponsored PyMOL molecular visualization system.
https://pymol.org/
Other
1.15k stars 275 forks source link

PyMOL-Error: can't find 'pymol.povray' #282

Open eusebiu opened 1 year ago

eusebiu commented 1 year ago

I am trying remove the dependency on Python from the generated PyMOL after setup install using pyinstaller. C:\PyMol\Lib\site-packages\pymol> pyinstaller .\__init__.py -n PyMol --clean --noconfirm

After the dist folder is generated, I run the exe: C:\PyMol\Lib\site-packages\pymol\dist\PyMol> .\PyMol.exe but I get the error:

PyMOL-Error: can't find pymol.povray

Apparently, the povray.py file is somehow ignored by pyinstaller. Running init.py from python works fine (i.e. PyMol Viewer starts).

How can I pass this error?

eusebiu commented 1 year ago

I think I found an workaround. I've added these to api.py.

from .povray import render_from_string
from .parser import *

After that, the compiled exe ran without a problem