Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python #256

Open
vpbrendel opened this issue Jul 30, 2020 · 1 comment
Open

python #256

vpbrendel opened this issue Jul 30, 2020 · 1 comment
Assignees

Comments

@vpbrendel
Copy link
Member

There will be current Linux systems that do not have "python" defined and instead expect "python3" to be typed. Fedora 32 seems to be in this category. This brings up the discussion again whether to have /usr/bin/env python in our script headers. The code will fail, trivially.

@standage
Copy link
Member

It looks like the Fedora folks are in the process of making python refer to python3: https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3. At the moment it is a symlink to python2. For them, it's not as simple as replacing the symlink, since they have to worry about consistent names for Python packaged managed by yum/dnf. But for us the easiest solution my be to make sure the python3 package is installed and symlink /usr/bin/python to /usr/bin/python3.

I think the biggest reason this hasn't been an issue for me is that virtual environments have really gained a lot of traction in the last several years as the best way to manage Python installations (and software installations more generally). The virtualenv tool was the trailblazer here, but Conda is what brought virtual environments to almost universal adoption. When you set up a new environment, you specify which version of Python you want, and it sets all the symlinks accordingly.

Setting up a Conda environment within a Singularity container is overkill, so until Fedora completes the transition to Python 3 default-ness, it might be best it we managed symlinks ourselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants