Skip to content

Conversation

boegel
Copy link
Member

@boegel boegel commented Mar 14, 2021

This is a small enhancement for the eb command: only accepted the python* command if it's able to import easybuild.main.

This fixes the following strange/confusing situation, which occurs currently because eb considers python before python3 (unless $EB_PYTHON is set):

# default Python command is Python 2
$ python -V
Python 2.7.18

# use pip3 to install EasyBuild, with the intention to run it via 'python3'
$ pip3 install easybuild

# try running 'eb' fails because default 'python' command is not Python 3
$ eb --version
/usr/bin/python: No module named easybuild

@boegel boegel added this to the next release (4.3.4?) milestone Mar 14, 2021
Copy link
Contributor

@akesandgren akesandgren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akesandgren
Copy link
Contributor

Going in, thanks @boegel!

@akesandgren akesandgren merged commit d6fd180 into easybuilders:develop Mar 15, 2021
@boegel boegel deleted the eb_enhancements branch March 15, 2021 18:19
bartoldeman added a commit to ComputeCanada/easybuild-framework that referenced this pull request Apr 19, 2022
This is a much cheaper test than "import easybuild.main" and still
solves the same issue as easybuilders#3610.

This reduces the wall time for "eb --version" from 1.35s to 0.73s
in our configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants