Re: [PyMOL] Compiling open source pymol 2.4
Agreed, Thomas. Thanks for your help! > -Original Message- > From: Thomas Holder > Sent: Tuesday, March 12, 2019 12:14 PM > To: Markus Heller > Cc: pymol-users@lists.sourceforge.net > Subject: Re: [PyMOL] Compiling open source pymol 2.4 > > Hi Markus, > > I recommend to use Python 3. The PyMOLWiki has updated versions of those > two failing scripts: > > https://pymolwiki.org/index.php/Pairwise_distances > https://pymolwiki.org/index.php/Polarpairs > > I don't know why there would be no menu bar with Python 2.7. But if Python 3 > works for you, I think there is no need to figure that out. > > Cheers, > Thomas > > > On Mar 12, 2019, at 7:34 PM, Markus Heller wrote: > > > > Hi all, > > > > I'm having trouble compiling open source Pymol 2.4. > > > > If I compile with python 2.7, the compilation finishes without errors or > warnings, but when I start Pymol, I don't see the menu bar at the top of the > window, and I don't see any errors. > > > > If, on the other hand, I compile with python 3, Pymol starts and I see the > > menu > bar, but I get warnings in the Pymol console that are related to a version > conflict > of python 3 used for compilation and python 2 used in some scripts, e.g. the > ones shown below. > > > > What's the python version to use for compiling, and how do I best proceed? > > > > Thanks > > Markus > > > > This is part of the output shown in the Pymol console on startup: > > > > PyMOL>run /home/mheller/.pymol/show_bumps.py > > PyMOL>run /home/mheller/.pymol/pairwisedistances.py > > Traceback (most recent call last): > > File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 483, in > > run > >run_(path, ns_pymol, ns_pymol) > > File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 532, in > run_file > >execfile(file,global_ns,local_ns) > > File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 526, in > execfile > >co = compile(pi.file_read(filename), filename, 'exec') File > > "/home/mheller/.pymol/pairwisedistances.py", line 13 > >print "" > > ^ > > SyntaxError: Missing parentheses in call to 'print'. Did you mean print("")? > > PyMOL>run /home/mheller/.pymol/supercell.py run > > PyMOL>/home/mheller/.pymol/get_raw_distances.py > > PyMOL>run /home/mheller/.pymol/polarpairs.py > > Traceback (most recent call last): > > File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 483, in > > run > >run_(path, ns_pymol, ns_pymol) > > File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 532, in > run_file > >execfile(file,global_ns,local_ns) > > File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 526, in > execfile > >co = compile(pi.file_read(filename), filename, 'exec') File > > "/home/mheller/.pymol/polarpairs.py", line 39 > >print 'Settings: cutoff=%.1fangstrom angle=%.1fdegree' % (cutoff, angle) > > ^ > > SyntaxError: invalid syntax > > -- > Thomas Holder > PyMOL Principal Developer > Schrödinger, Inc. ___ PyMOL-users mailing list Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe
Re: [PyMOL] Compiling open source pymol 2.4
Hi Markus, I can answer part of your question. There are error messages about print statement in python2 needing to be converted to print() functions for python3. You can run the program 2to3 on your python scripts to convert them from python2 to python3. This program probably came with your one of the Python's on your machine. It is not perfect. You might have to follow up with some manual edits. Best regards, Blaine Blaine Mooers, Ph.D. Associate Professor Department of Biochemistry and Molecular Biology College of Medicine University of Oklahoma Health Sciences Center S.L. Young Biomedical Research Center (BRC) Rm. 466 975 NE 10th Street, BRC 466 Oklahoma City, OK 73104-5419 From: Markus Heller [mhel...@cdrd.ca] Sent: Tuesday, March 12, 2019 1:34 PM To: pymol-users@lists.sourceforge.net Subject: [EXTERNAL] [PyMOL] Compiling open source pymol 2.4 Hi all, I'm having trouble compiling open source Pymol 2.4. If I compile with python 2.7, the compilation finishes without errors or warnings, but when I start Pymol, I don't see the menu bar at the top of the window, and I don't see any errors. If, on the other hand, I compile with python 3, Pymol starts and I see the menu bar, but I get warnings in the Pymol console that are related to a version conflict of python 3 used for compilation and python 2 used in some scripts, e.g. the ones shown below. What's the python version to use for compiling, and how do I best proceed? Thanks Markus This is part of the output shown in the Pymol console on startup: PyMOL>run /home/mheller/.pymol/https://urldefense.proofpoint.com/v2/url?u=http-3A__show-5Fbumps.py&d=DwICAg&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=m0TqOpm-acg2I6R7GInhCKREAQggkxgFI3UGfclNs8g&s=bs-lPs-R0puQhuGq2S89IblUxdRGrAxvt7D_LqSLYBo&e= PyMOL>run /home/mheller/.pymol/https://urldefense.proofpoint.com/v2/url?u=http-3A__pairwisedistances.py&d=DwICAg&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=m0TqOpm-acg2I6R7GInhCKREAQggkxgFI3UGfclNs8g&s=C0opkKUhEfyNxDi0bpCC9w3s30eP0fV8eKhv8lemrVw&e= Traceback (most recent call last): File "/home/mheller/pymol-2.4/lib/python/pymol/https://urldefense.proofpoint.com/v2/url?u=http-3A__parsing.py&d=DwICAg&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=m0TqOpm-acg2I6R7GInhCKREAQggkxgFI3UGfclNs8g&s=UwuMSV6A6OB1jIngETqXpMT5HPhn_p6IHCLoVp5KNPQ&e=";, line 483, in run run_(path, ns_pymol, ns_pymol) File "/home/mheller/pymol-2.4/lib/python/pymol/https://urldefense.proofpoint.com/v2/url?u=http-3A__parsing.py&d=DwICAg&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=m0TqOpm-acg2I6R7GInhCKREAQggkxgFI3UGfclNs8g&s=UwuMSV6A6OB1jIngETqXpMT5HPhn_p6IHCLoVp5KNPQ&e=";, line 532, in run_file execfile(file,global_ns,local_ns) File "/home/mheller/pymol-2.4/lib/python/pymol/https://urldefense.proofpoint.com/v2/url?u=http-3A__parsing.py&d=DwICAg&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=m0TqOpm-acg2I6R7GInhCKREAQggkxgFI3UGfclNs8g&s=UwuMSV6A6OB1jIngETqXpMT5HPhn_p6IHCLoVp5KNPQ&e=";, line 526, in execfile co = compile(pi.file_read(filename), filename, 'exec') File "/home/mheller/.pymol/https://urldefense.proofpoint.com/v2/url?u=http-3A__pairwisedistances.py&d=DwICAg&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=m0TqOpm-acg2I6R7GInhCKREAQggkxgFI3UGfclNs8g&s=C0opkKUhEfyNxDi0bpCC9w3s30eP0fV8eKhv8lemrVw&e=";, line 13 print "" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("")? PyMOL>run /home/mheller/.pymol/https://urldefense.proofpoint.com/v2/url?u=http-3A__supercell.py&d=DwICAg&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=m0TqOpm-acg2I6R7GInhCKREAQggkxgFI3UGfclNs8g&s=1cEHfd8ZYNLzS3SDZf3MA3JXMrWqQ46U7dgLaBVEyHU&e= PyMOL>run /home/mheller/.pymol/https://urldefense.proofpoint.com/v2/url?u=http-3A__get-5Fraw-5Fdistances.py&d=DwICAg&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=m0TqOpm-acg2I6R7GInhCKREAQggkxgFI3UGfclNs8g&s=uU2XHleaq91jTq-TtUuewYn7hUxfCFtCE2C89CKutLs&e= PyMOL>run /home/mheller/.pymol/https://urldefense.proofpoint.com/v2/url?u=http-3A__polarpairs.py&d=DwICAg&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=m0TqOpm-acg2I6R7GInhCKREAQggkxgFI3UGfclNs8g&s=2opEfhq5bNu2N5-W8xtazkiK7_XQEA85VwlCLVO-LrY&e= Traceb
Re: [PyMOL] Compiling open source pymol 2.4
Hi Markus, I recommend to use Python 3. The PyMOLWiki has updated versions of those two failing scripts: https://pymolwiki.org/index.php/Pairwise_distances https://pymolwiki.org/index.php/Polarpairs I don't know why there would be no menu bar with Python 2.7. But if Python 3 works for you, I think there is no need to figure that out. Cheers, Thomas > On Mar 12, 2019, at 7:34 PM, Markus Heller wrote: > > Hi all, > > I'm having trouble compiling open source Pymol 2.4. > > If I compile with python 2.7, the compilation finishes without errors or > warnings, but when I start Pymol, I don't see the menu bar at the top of the > window, and I don't see any errors. > > If, on the other hand, I compile with python 3, Pymol starts and I see the > menu bar, but I get warnings in the Pymol console that are related to a > version conflict of python 3 used for compilation and python 2 used in some > scripts, e.g. the ones shown below. > > What's the python version to use for compiling, and how do I best proceed? > > Thanks > Markus > > This is part of the output shown in the Pymol console on startup: > > PyMOL>run /home/mheller/.pymol/show_bumps.py > PyMOL>run /home/mheller/.pymol/pairwisedistances.py > Traceback (most recent call last): > File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 483, in run >run_(path, ns_pymol, ns_pymol) > File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 532, in > run_file >execfile(file,global_ns,local_ns) > File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 526, in > execfile >co = compile(pi.file_read(filename), filename, 'exec') > File "/home/mheller/.pymol/pairwisedistances.py", line 13 >print "" > ^ > SyntaxError: Missing parentheses in call to 'print'. Did you mean print("")? > PyMOL>run /home/mheller/.pymol/supercell.py > PyMOL>run /home/mheller/.pymol/get_raw_distances.py > PyMOL>run /home/mheller/.pymol/polarpairs.py > Traceback (most recent call last): > File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 483, in run >run_(path, ns_pymol, ns_pymol) > File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 532, in > run_file >execfile(file,global_ns,local_ns) > File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 526, in > execfile >co = compile(pi.file_read(filename), filename, 'exec') > File "/home/mheller/.pymol/polarpairs.py", line 39 >print 'Settings: cutoff=%.1fangstrom angle=%.1fdegree' % (cutoff, angle) > ^ > SyntaxError: invalid syntax -- Thomas Holder PyMOL Principal Developer Schrödinger, Inc. ___ PyMOL-users mailing list Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe
[PyMOL] Compiling open source pymol 2.4
Hi all, I'm having trouble compiling open source Pymol 2.4. If I compile with python 2.7, the compilation finishes without errors or warnings, but when I start Pymol, I don't see the menu bar at the top of the window, and I don't see any errors. If, on the other hand, I compile with python 3, Pymol starts and I see the menu bar, but I get warnings in the Pymol console that are related to a version conflict of python 3 used for compilation and python 2 used in some scripts, e.g. the ones shown below. What's the python version to use for compiling, and how do I best proceed? Thanks Markus This is part of the output shown in the Pymol console on startup: PyMOL>run /home/mheller/.pymol/show_bumps.py PyMOL>run /home/mheller/.pymol/pairwisedistances.py Traceback (most recent call last): File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 483, in run run_(path, ns_pymol, ns_pymol) File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 532, in run_file execfile(file,global_ns,local_ns) File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 526, in execfile co = compile(pi.file_read(filename), filename, 'exec') File "/home/mheller/.pymol/pairwisedistances.py", line 13 print "" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("")? PyMOL>run /home/mheller/.pymol/supercell.py PyMOL>run /home/mheller/.pymol/get_raw_distances.py PyMOL>run /home/mheller/.pymol/polarpairs.py Traceback (most recent call last): File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 483, in run run_(path, ns_pymol, ns_pymol) File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 532, in run_file execfile(file,global_ns,local_ns) File "/home/mheller/pymol-2.4/lib/python/pymol/parsing.py", line 526, in execfile co = compile(pi.file_read(filename), filename, 'exec') File "/home/mheller/.pymol/polarpairs.py", line 39 print 'Settings: cutoff=%.1fangstrom angle=%.1fdegree' % (cutoff, angle) ^ SyntaxError: invalid syntax ___ PyMOL-users mailing list Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe