# Issue with custom conda env (built on top of xp65) in PBS job

**URL:** <https://forum.access-hive.org.au/t/issue-with-custom-conda-env-built-on-top-of-xp65-in-pbs-job/5748>\
**Category:** Technical\
**Tags:** help, conda, gadi, pbs\
**Created:** [6 January 2026 02:27 UTC](https://forum.access-hive.org.au/t/issue-with-custom-conda-env-built-on-top-of-xp65-in-pbs-job/5748 "2026-01-06T02:27:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mblack](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@mblack](https://forum.access-hive.org.au/u/mblack)\
**Post date:** [6 January 2026 02:27 UTC](https://forum.access-hive.org.au/t/issue-with-custom-conda-env-built-on-top-of-xp65-in-pbs-job/5748/1 "2026-01-06T02:27:23Z")

</div>

Hi,

I have a (likely simple) question that someone may be able to assist with. I have created my own custom python environment built on top of xp65 following the [CLEX blog](https://coecms.github.io/posts/2024-06-05-mixing-python-envs.html?highlight=conda#virtual-environments "https://coecms.github.io/posts/2024-06-05-mixing-python-envs.html?highlight=conda#virtual-environments"), but having issues with this working in a PBS job.

My custom env was built at the time of analysis3-25.10 being the default:

```bash
cd ~/conda_envs/
module use /g/data/xp65/public/modules
module load conda/analysis3
python3 -m venv heatwatch --system-site-packages
source heatwatch/bin/activate
pip install git+https://github.com/CenterForTheBuiltEnvironment/pythermalcomfort.git
pip install earthkit-meteo

```

My PBS script:

```bash
#!/bin/bash
#PBS -N heatwatch
#PBS -P mn51
#PBS -q normalbw
#PBS -l walltime=1:00:00
#PBS -l mem=256GB
#PBS -l ncpus=28
#PBS -l storage=gdata/mn51+gdata/xp65
#PBS -l jobfs=400GB

module use /g/data/xp65/public/modules
module load conda/analysis3-25.10
source /home/563/mtb563/conda_envs/heatwatch/bin/activate

which python
~/conda_envs/heatwatch/bin/python /g/data/mn51/users/mtb563/repos_collab/heatwatch/analysis/calc_heatwatch.py

```

This returns:

(which python) : `/g/data/xp65/public/apps/med_conda_scripts/analysis3-25.10.d/bin/python`

and the error message:

```auto
Loading conda/analysis3-25.10
  Loading requirement: singularity
/local/spool/pbs/mom_priv/jobs/157583170.gadi-pbs.SC: line 18: /home/563/mtb563/conda_envs/heatwatch/bin/python: No such file or directory

```

It cannot find the version of python within my _heatwatch_ conda environment (which ultimately points to:

![image](https://us1.discourse-cdn.com/flex020/uploads/access1/optimized/2X/b/b356409f5cde2f1bbdfe5131baaf7d372f0ae4b8_2_690x23.jpeg)

I am guessing this is a container related issue. Any thoughts on what I am doing wrong or need to do in addition? I feel like I am missing something simple.

Thanks for you help.

---

<div class="post-metadata">

**Author:** ![Scott](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/scott/32/37_2.png) [@Scott](https://forum.access-hive.org.au/u/Scott)\
**Post date:** [6 January 2026 03:13 UTC](https://forum.access-hive.org.au/t/issue-with-custom-conda-env-built-on-top-of-xp65-in-pbs-job/5748/2 "2026-01-06T03:13:41Z")

</div>

Strange, that’s supposed to just work - for the NRI folks I believe you want Python’s `sys.executable` to point to the python wrapper script rather than the executable in the container so that venvs function properly.

As a workaround to get you going, prepend a command with `launcher.sh` to explicitly run it in the container, e.g.

```bash
launcher.sh ~/conda_envs/heatwatch/bin/python /g/data/mn51/users/mtb563/repos_collab/heatwatch/analysis/calc_heatwatch.py

```

---

<div class="post-metadata">

**Author:** ![mblack](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@mblack](https://forum.access-hive.org.au/u/mblack)\
**Post date:** [6 January 2026 23:35 UTC](https://forum.access-hive.org.au/t/issue-with-custom-conda-env-built-on-top-of-xp65-in-pbs-job/5748/3 "2026-01-06T23:35:14Z")

</div>

Thanks very much @Scott, this worked! I will hold off marking this as solved until the NRI team are back and had a chance to see your suggestion.
