-
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
Missing spec variant in upstream installation leads to KeyError #28188
Comments
This is an issue with the implementation of |
Hm, @alalazo I think in general most packages are written in a way where they assume the variants defined above are usable in methods below. We'd have to communicate/review better that that's not a safe assumption? |
The issue is using: spec.variants['symbol_suffix'].value directly. In those cases it's better to use |
Hm, but then we're repeating defaults everywhere. |
Not variant defaults. I mean something like: variant = spec.variants.get('symbol_suffix')
if variant is None:
# Handle the case of the variant being missing. I actually have an idea for this kind of issues. What if we can run a post-install hook to record the results of the possible calls to |
We discussed this issue last Wed. at the community telco. The outcome is, for the time being, to treat these kind of issues as style issues for packages. See here for the minutes. |
Hello, I have a similar problem with version 0.19.0.dev0 when installing py-numpy:
It is not clear from the previous discussion if there is a workaround. |
You can install a new openblas that has the variant. Also, the fix to this is to use |
a quick workaround is: spack install <package_name> ^openblas symbol_suffix=none |
Steps to reproduce
openblas
in a Spack tree from before OpenBLAS: Add a symbol suffix option #27500py-scipy
. Use--reuse
or another means to make sure the existing openblas installation is used. I encountered this issue when installing from an environment lockfile, which was created with the new Spack clone but uses the upstream openblas installation. The lockfile doesn't list the new 'symbol_suffix' parameter, which leads to the KeyError below.Error message
Information on your system
General information
spack debug report
and reported the version of Spack/Python/PlatformThe text was updated successfully, but these errors were encountered: