Websockify from OnDemand RPMs

It looks as though the websockify that is provided as an RPM from the OnDemand yum/dnf repository has /usr/bin/python2 hard coded as the python interpreter.

We are doing and upgrade to RH 8, python 2 is no longer a required package, and as part of the decade-long attempt to wean people from python version 2, which I think is no longer supported, are there any plans to convert that to use /usr/bin/python3?

That appears to be the only thing that requires us to install

python-websockify.noarch                  0.8.0-1.el8                  @ondemand
python2.x86_64                  2.7.18-4.module+el8.4.0+9577+0b56c8de  @rhel-8-for-x86_64-appstream-eus-rpms
python2-libs.x86_64             2.7.18-4.module+el8.4.0+9577+0b56c8de  @rhel-8-for-x86_64-appstream-eus-rpms
python2-pip.noarch              9.0.3-18.module+el8.3.0+7707+eb4bba01  @rhel-8-for-x86_64-appstream-eus-rpms
python2-pip-wheel.noarch        9.0.3-18.module+el8.3.0+7707+eb4bba01  @rhel-8-for-x86_64-appstream-eus-rpms
python2-setuptools.noarch       39.0.1-13.module+el8.4.0+9442+27d0e81c @rhel-8-for-x86_64-appstream-eus-rpms
python2-setuptools-wheel.noarch 39.0.1-13.module+el8.4.0+9442+27d0e81c @rhel-8-for-x86_64-appstream-eus-rpms

on all our login and compute nodes, which we were hoping to be able to keep python2 free.


Thanks for letting us know. I’ve opened a ticket with the repo to see what we can do. Depending on the compatibility it may or may not be in 2.0.

We are running OOD2 on RHEL8 where websockify has moved to a pip package. In installing OOD2, I did the following, which worked for us:

dnf remove python2-websockify
pip3 install websockify

1 Like

We are installing Open OnDemand v2.0.20, and I checked what was in the RH8 OnDemand repository from which we are getting it.

It looks like there are websockify RPMs out there for Python 3, but I do not know whether there are still issues with things like TurboVNC, which there might have been at one time.

It would be nice not to have to install python 2 just for the websockify from OnDemand.

Thanks for looking into it!

Oh, cool!

Thanks for the suggestion to use pip3 install. I’ll see if we can try that!

This is likely a sysadmin preference so can vary from site to site but mixing pip and RPM installs can sometimes lead to problems where suddenly you have files that RPMs think they manage but really they are coming from pip. This is much less of an issue with RHEL8+ since they use a different install of python for the package manager and I think the websockify dependencies are pretty minimal so shouldn’t pull in too much except maybe setuptools which could conflict with RPMs.

The changes for the websockify package are here: Build websockify against Python 3 and update version to 0.10.0 by treydock · Pull Request #214 · OSC/ondemand-packaging · GitHub. I’m not sure it’s appropriate to change Python versions for 2.0 repos but you could easily point your system at the “latest” compute repo to get this newer package once they are released. Just replace “2.0” in the compute repo with “latest”. Here is baseurl line:


I would avoid latest for web repos but for compute it’s fairly harmless at this time.

Hi Bennet:

UAz has not used the websockify RPM for historical reasons (our OOD genesis preceded the OOD repo). Currently, I’m running websockify via a wrapper script referenced in the cluster YAML file “script_wrapper” section.

That wrapper uses our python3 module which has had ‘pip3 install websockify’ done to it. Haven’t seen any problems with that




@bennet The new RPM is here: https://yum.osc.edu/ondemand/latest/compute/el8/x86_64/python3-websockify-0.10.0-1.el8.noarch.rpm. Can adjust the compute repo to use “latest” or just install RPM directly if you want. It will replace the older “python-websockify”. This will be part of the 2.1 repos once those are released but using “latest” for compute is pretty safe at this point.