TECHZEN Zenoss User Community ARCHIVE  

Python3 and zenoss 4.2.5

Subject: Python3 and zenoss 4.2.5
Author: Joan
Posted: 2017-02-13 05:11

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 "", line 1, in
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



Subject: There is no trick. Zenoss
Author: Jane Curry
Posted: 2017-03-13 13:00

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

Email: jane.curry@skills-1st.co.uk    Web: https://www.skills-1st.co.uk



< Previous
zenbatchdump and zenbatchload device totals do not match
  Next
Importing backup into new Zenoss 5 install, facade error
>