Python3 and zenoss 4.2.5

2 posts / 0 new
Last post
Aseques
Aseques's picture
Offline
Last seen: 1 month 6 days ago
Joined: 09/01/2014 - 02:08
Posts: 90
Python3 and zenoss 4.2.5

I installed python 3 in my zenoss server because I am using it to write some checks (yum install python34). Everythin works witihin zenoss without issues, but when I log into the shell with the user zenoss i get a LOT of errors on any call to python3 (python2 remains working as expected)

Error in sitecustomize; set PYTHONVERBOSE for traceback:
AttributeError: 'module' object has no attribute 'setdefaultencoding'
Error processing line 1 of /opt/zenoss/lib/python/Products.AdvancedQuery-3.0.3-py2.7-nspkg.pth:

  Traceback (most recent call last):
    File "/usr/lib64/python3.4/site.py", line 167, in addpackage
      exec(line)
    File "<string>", line 1, in <module>
  ImportError: No module named 'new'

Remainder of file ignored
Error processing line 1 of /opt/zenoss/lib/python/Products.BTreeFolder2-2.13.4-py2.7-nspkg.pth:
..........

I've seen that it's related to the variable PYTHONPATH that is set to "/opt/zenoss/lib/python" on my system, if I unset the variable it will work normally.

What trick have you used to have python3 in zenoss?

Jcurry
Jcurry's picture
Offline
Last seen: 1 day 11 hours ago
Joined: 01/02/2014 - 13:04
Posts: 391
There is no trick. Zenoss

There is no trick. Zenoss only uses Python 2.x - 2.7 for later versions; 2.6 for Zenoss 3. Do make very sure that you don't end up with your Python 3 as the default in a Zenoss environment or many things will break.

Cheers,

Jane

Log in to post comments