Skip to content

Conversation

@branfosj
Copy link
Member

@branfosj branfosj commented Jun 5, 2025

Revert the shebang change in #3717 as it breaks installs.

@branfosj branfosj added this to the next release (5.1.1?) milestone Jun 5, 2025
@jfgrimm
Copy link
Member

jfgrimm commented Jun 6, 2025

@branfosj any more detail on exactly how it breaks installs?

@boegel boegel modified the milestones: 5.1.1, release after 5.1.1 Jul 2, 2025
@chanbakjsd
Copy link

Hi, I have encountered the same issue and would like to expand a bit more.

One feature of Conda is being able to specify the version of Python by creating a new environment:

conda create -n example python=3.10

After activating such an environment, the Python executable is overridden as expected. However, bin/conda expects to be able to import conda.cli which is installed in lib/python3.12/site-packages.

This causes a module not found error and breaking Conda the moment such an environment is activated.

This issue can be replicated using both Miniconda3 and Miniforge3. Setting the value of fix_python_shebang_for = [] allows this use case to work.

To reproduce:

module load Miniforge3
conda create -n py39 python=3.9
source activate py39
conda # Triggers error without unsetting the shebang option.

@branfosj
Copy link
Member Author

Yes ^ was the issue we were seeing.

Specifically we saw it with

module load Miniforge3/24.11.3-0
eval "$(${EBROOTMINIFORGE3}/bin/conda shell.bash hook)"
source "${EBROOTMINIFORGE3}/etc/profile.d/mamba.sh"
conda create --yes --prefix /tmp/condaenv python=3.9
conda activate /tmp/condaenv

Then

$ conda --help
Traceback (most recent call last):
  File "/home/simon/work/eb/installpath/software/Miniforge3/24.11.3-0/bin/conda", line 12, in <module>
    from conda.cli import main
ModuleNotFoundError: No module named 'conda'

@jfgrimm jfgrimm merged commit 0553aab into easybuilders:develop Jul 21, 2025
17 checks passed
@branfosj branfosj deleted the revert-shebang branch July 21, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants