I have a CentOS 5 web server running with CPanel.

I made an altinstall of python 2.7 (to not crash things like yum) and changed python path in cpanel config files, pointing to new python.

But my problem is when I try to do any activity in CPanel, occours an error. Like this bellow.

2011-08-19 03:31:42 +0000] info [quotacheck] Quota checks and notifications disabled for mail accounts and disk usage per Tweak Settings.
Traceback (most recent call last):
  File "/usr/local/cpanel/scripts/postwwwacct", line 24, in ?
    import createvhosts
  File "/usr/local/cpanel/scripts/createvhosts.py", line 2, in ?
    import yaml
  File "/usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-x86_64.egg/yaml/__init__.py", line 26
SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause
Traceback (most recent call last):
  File "/usr/local/cpanel/hooks/subdomain/addsubdomain", line 5, in ?
    import yaml
  File "/usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-x86_64.egg/yaml/__init__.py", line 26
SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause

I noticed that python 2.7 is using libraries of 2.4 version. There is a way to add python 2.7 library path do enviroment to make cpanel things correctly, and not crash python 2.4?

link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.