-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
package requires python version 3:, but spec asked for 2.7.16 #11531
Comments
Could you please look over and comment on #11468? The central question is... is it possible / feasible to produce a single version of Spack that supports Python2 and Python3 stacks? Or starting 2020-Jan-01 should we stop trying to make things work for Python2? I was leaning toward the former. But if we can't figure out how to make things like this package work, then maybe it's more practical to drop Python2 support. |
I've run into similar issues, and have found if I add a 3.x version preference for python in packages.yaml or an equivalent section in spack.yaml (if using spack env) that fixes the problem, e.g.
I just tried this with your two python dependency lines added to paraview, and it is working for me. maybe we should consider adding a something like that to the default packages.yaml distributed with spack? |
@baberlevi Yes, this works! Thanks! Yes, it may make sense to add something like this to the default packages.yaml. I used a slightly simpler version:
|
Currently, the |
Hi, I have below in
|
@sunandosamaddar That looks like another known bug in the concretizer. To get around this, you can do: $ spack install py-jupyter-notebook ^python@3: |
Thanks @adamjstewart! |
Duplicate of #1781 |
This happens because being a Python package implies an unconditional dependence on extends('python')
depends_on('python', type=('build', 'run')) The conditional dependencies in the description create the same case as in #1781. |
I am trying to change the paraview package so that version 5.6 uses python3 and all previous version use python2. So I have the following code:
If I don't do the same branching on all python packages, I will get the error in the title for the following command:
spack spec paraview+python
However, if I specify the version that the previous command chooses, the command works correctly.
spack spec paraview@5.6.0+python
Numpy is one of the packages that are needed in paraview. I will have to use:
instead of the simpler:
depends_on('py-numpy', when='+python', type=('build', 'run'))
to avoid the error in the title. Attached is the package.py that shows this error.
paraview.zip
The text was updated successfully, but these errors were encountered: