You need to define the environmental variable PYMOL_PATH first, which
for example in Ubuntu with pymol installed from repositories should
point at /usr/lib/pymodules/python2.6/pymol. Try this from python
prompt to verify
from imp import find_module
print find_module('pymol')[1]
You may also need to define PYMOL_DATA and CHEMPY_DATA for full
functionality. All this can be deduced from wrapper script that fires
up pymol, it should be something like /usr/bin/pymol (use "which pymol"
to verify its location).
But perhaps you are using windows? In which case your corresponding
environmental variable should be something like "C:\Program Files\DeLano
Scientific\PyMOL\modules\pymol". See here regarding setting
environmental variables in windows
http://docs.python.org/using/windows.html
or just change os.environ directly.
HTH,
Ed.
On Wed, 2010-11-10 at 19:15 +0900, Rojan Shrestha wrote:
> Hello:
>
>
>
> I am trying to use Pymol in the python script but I am facing very
> simple error: “No module named pymol”.
>
>
>
> I guess this is very simple error.
>
>
>
> I have installed binary file of Pymol. When I tried to import the
> pymol, the error message was displayed.
>
>
>
> From where I could get Pymol library so that this error will vanish.
>
>
>
> Thank you.
>
>
>
> Regards,
>
>
>
> Rojan
>
>
--
"I'd jump in myself, if I weren't so good at whistling."
Julian, King of Lemurs