Trying to upgrade to 5.6 but I am stuck with a message that I've never seen

Hi there,

Trying to upgrade from 5.4.10 to 5.6 before the blade falls… I am simply trying to stop my Omero processes before migrating to 5.5 than to 5.6 but I get this:

File “./omero”, line 32
print “FATAL: Running %s as root can corrupt your directory permissions.” % sys.argv[0]

SyntaxError: Missing parentheses in call to ‘print’

I run the ./omero command as the omero user; first time seeing this. And I get this error for any type of action: web, admin, etc.

Any one has an idea on this? Thanks in advance :wink:

S.

Updated the tags to put this in the omero forum.

1 Like

It sounds like you are trying to stop OMERO 5.4 using Python 3, which unfortunately won’t work. You’ll likely need to have two separate Python environments.

~Josh

I think you meant Python 3 (who would ask for parentheses)

2 Likes

Hi guys,

That makes sense; simply symlinking the python command from python2 to python3 would do the thing?

Best regards

S

As Josh said, it might be better to setup two virtual environements, either with virtualenv or conda
With conda it would go something like:

conda create -n py27 python=2.7
conda activate py27
# install omero-py in the new venv
pip install omero # I think

And then you can execute your omero comands in this environment.

Something similar would go on with venv or virtualenv, but I’m not familiar with them.
Just symlinking will pose dependency issues I fear.

Best
G.

1 Like

Doh! Thanks.

For Python 3, pip install omero-py will work. For Python 2, it won’t. The Python libraries are available provided along with the bin/omero command (under lib/python).

~Josh