Pymol Doesn't Initialize after Upgrading to Python 2.6
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pymol (Ubuntu) |
Fix Released
|
High
|
Morten Kjeldgaard |
Bug Description
While the last rebuild updated Pymol's python dependency to include 2.6, it crashes with the following error:
Error: unable to initalize the pymol.cmd module
Traceback (most recent call last):
File "/var/lib/
from api import *
File "/var/lib/
as = show_as
^
SyntaxError: invalid syntax
It looks like this problem is already known; by examining the source of api.py I found this:
# dang! Python 2.6 will break PyMOL's "as" method.
# Proposal:
# 1. stick with Python <=2.5 for as long as possible
# 2. convert API method to cmd.show_as() and leave "as" in the scripting langauge
# 3. allow "show_as" in the scripting language
as = show_as
While I'm not sure exactly what's going on (never touched Python), commenting out the final line seems to correct the problem--or at least allow Pymol to start.
Related branches
description: | updated |
Changed in pymol (Ubuntu): | |
status: | New → Fix Committed |
I'd like an FFe for this upload.
I get the following error message when attempting to install the current jaunty pymol_1.1-1ubuntu1:
Processing triggers for python-support ... python- support/ python2. 6/chempy/ fast/__ init__. py ... lib/python- support/ python2. 6/chempy/ fast/__ init__. py', 67, 23, ' ll = as[attrib]\n'))
Compiling /var/lib/
SyntaxError: ('invalid syntax', ('/var/
Compiling /var/lib/ python- support/ python2. 6/pymol/ api.py ... lib/python- support/ python2. 6/pymol/ api.py' , 381, 2, 'as = show_as\n'))
SyntaxError: ('invalid syntax', ('/var/
Attached patch contains a fix.