Downgrade pytorch to older version

Due to compatibility issues I need to use an old version of pytorch (v1.5.0) instead of the much more recent v1.9.0 one which I get by default.

I successfully installed the package (v1.5.0) on CERNBOX and then tried to open a new SWAN session with “$CERNBOX_HOME/.local/lib/python3.8/site-packages” entered into the session configuration menu as described here: Install packages in CERNBox - Help .

However, when checking my pytorch version in the new SWAN session I still get v1.9.0 and clearly my approach is incorrect.

Any advice on how to correctly go about this?


Did you define (and select when starting your SWAN session) an environment script that prepends $CERNBOX_HOME/.local/lib/python3.8/site-packages to the PYTHONPATH?



If yes, I would double check what’s the PYTHONPATH when you are in the notebook, it should have the prepended directory.

Thanks very much for your reply.
Do you have an example of an environment script for this purpose? I am not very familiar with building them and I think mine is incorrect.


Just a script that contains:

export PYTHONPATH=$CERNBOX_HOME/.local/lib/python3.8/site-packages:$PYTHONPATH

should do the trick.

Thanks very much, it looks like that works!

It appears I now have problems with the package installation, but I think that is unconnected and my question has been answered.