Skip to content

default python preference for packages.yaml#11539

Closed
baberlevi wants to merge 1 commit intospack:developfrom
ResearchIT:update-default-python
Closed

default python preference for packages.yaml#11539
baberlevi wants to merge 1 commit intospack:developfrom
ResearchIT:update-default-python

Conversation

@baberlevi
Copy link
Copy Markdown
Member

This PR adds a python preference order to default packages.yaml to help with issues relating to python2/3 concretization errors.

This doesn't solve all issues related to the 2/3 difficulty, but I think would make the 'out of the box' experience work more as expected without user customization required, especially for setups like environments and building in containers.

Related to: #11531, #11468, #11396

@baberlevi baberlevi requested review from citibeth and scheibelp May 23, 2019 16:29
@adamjstewart
Copy link
Copy Markdown
Member

Spack packages always default to the newest stable release. In the case of python, we explicitly set the default to 2 instead of 3. If we want to change the default to Python 3, this should be done by removing preferred=True, not by overriding the default in packages.yaml. See #10319 for the correct way to do this. Unfortunately, not all packages work with Python 3, and solving your concretization bugs will introduce bugs for others. Until #11468 is worked out, we won't be able to merge #10319.

@baberlevi
Copy link
Copy Markdown
Member Author

Makes sense - thanks for the explanation & pointer to the other issues

danlipsa added a commit to danlipsa/spack that referenced this pull request Jun 7, 2019
Workaround for
adding the following to your packages.yaml
packages:
  python:
    version: [3, 2]
without this you'll get:
paraview requires python version 3:, but spec asked for 2.7.16
for `spack spec paraview+python`
see spack pull request spack#11539
danlipsa added a commit to danlipsa/spack that referenced this pull request Jun 7, 2019
Workaround for
adding the following to your packages.yaml
packages:
  python:
    version: [3, 2]
without this you'll get:
paraview requires python version 3:, but spec asked for 2.7.16
for `spack spec paraview+python`
see spack pull request spack#11539
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

Successfully merging this pull request may close these issues.

2 participants