pymol-open-source icon indicating copy to clipboard operation
pymol-open-source copied to clipboard

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

Open eusebiu opened this issue 2 years ago • 1 comments

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 avatar Mar 25 '23 22:03 eusebiu

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

eusebiu avatar Mar 26 '23 15:03 eusebiu