Remote job execution raises error from local virtual environment

Hi Folks

I’m running galaxy 19.05 with both a local .venv and .venv_cluster for remote execution set in job_conf.xml.
Remote jobs execute but produce errors during post execution:

Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]

.venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 382, in
get_build_platform
File “/usr/lib64/python2.7/sysconfig.py”, line 10, in
‘stdlib’: ‘{base}/’+sys.lib+’/python{py_version_short}’,
AttributeError: ‘module’ object has no attribute ‘lib’

Interestingly these seem to originate in code from the local .venv.

Has anyone else come across similar problems? Local environment is ubuntu 18.04 python 2.7.15 and remote environment is SUSE 12.4 python 2.7.13.

Cheers
Derek

It looks like sourcing the cluster virtual environment needs to be done via an env statement in the job_conf.xml file. However, after the job is run it reverts to the local virtualenv. To reset this to the cluster virtual environment, the variable GALAXY_VIRTUAL_ENV needs to be set in the job_conf.xml to the cluster virtualenv. Setting both these ensures that the cluster virtual environment is used both prior to execution of the remote job and after when the meta data is being set.