-
Notifications
You must be signed in to change notification settings - Fork 684
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
Importing the package causes error #3660
Importing the package causes error #3660
Comments
So I can reproduce this on my *nix machine. It's a bit late so I'm probably forgetting something important / obvious, but the fact that works fine on numpy 1.22.x releases is rather odd, especially since I'm pretty sure I built the C/C++ files using 1.21.5 for 2.1.0. @tylerjereddy would you happen to have any thoughts here? |
I don't see anything obviously wrong in your conda-forge recipe, but the build definitely pulled in numpy 1.22 and built against that ABI: https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=502680&view=logs&j=517fe804-fa30-5dc2-1413-330699242c05&t=c10fa5f2-fdf6-5338-3bdb-c4bea7c23412&l=2242 You do have |
A decreased structure size almost certainly means that MDAnalysis was built with a too-new version of NumPy and then an attempt was made to use an older version of NumPy at runtime. On the PyPI side, this is exactly why we have the NumPy versions carefully pinned for building in On the I don't see a NumPy version pin? That seems bad? The SciPy version of the equivalent file does have an appropriate NumPy pin in the yaml: https://github.com/conda-forge/scipy-feedstock/blob/main/.ci_support/linux_64_numpy1.19python3.9.____cpythonpython_implcpython.yaml We seem to differ in the same way for OSX, which is the original case reported. I can ping someone if you need help adjusting that--I believe someone on our team is reasonably familiar with changing the conda-forge settings though? |
Yes, this is bad. I checked my suspicion this morning. The |
numpy and conda-forge both make the same suggestion re: how to to pin numpy as a dependency host:
- numpy
run:
- {{ pin_compatible('numpy') }} https://numpy.org/devdocs/user/depending_on_numpy.html#build-time-dependency |
re-opening, something broke on merge of the new feedstock -- investigating |
Just to mention this in case it helps simplify the MDAnalysis configuration -- it seems that many of the pinnings in pyproject.toml are similar to the oldest-supported-numpy package. That can be an easier way to guarantee broad support while still building against the oldest supported version for forward compatibility. Comparison: |
I believe there was a specific reason why @tylerjereddy decided to avoid oldest-supported-numpy, I can't remember specifically, it might be that we run slightly behind NEP29. For this specific issue, pyproject.toml is (or at least should be) ignored by conda-forge, which is the cause of some of our latest issues 😓 (pip 22.1 decided that they'd add in validation by default). I've fixed this temporarily with a host build pin, but now I'm trying to force conda-forge to use a reasonable numpy version for its various versions, I think I've done it, I just need to sit down and work out if the matrix works ABI-wise. |
Yeah, we need a slightly newer version of NumPy for one Python version vs. I suspect this will change in the future as we drop Python versions. |
@IAlibay is probably referring to this bug: pypa/pip#11116 Sounds like they will fix that upstream soon |
Closing this as fixed via the feedstock (at least it no longer fails for me locally). Please do re-open if this is not the case @tommy-waltmann |
Expected behavior
I should be able to import MDAnalysis without errors.
Actual behavior
Installing MDAnalysis from conda-forge and then importing gives the following output:
Code to reproduce the behavior
Create new conda environment
Now try to import in a python script
Current version of MDAnalysis
python -c "import MDAnalysis as mda; print(mda.__version__)"
) 2.1.0 (installed from conda-forge)python -V
)? 3.9.12The text was updated successfully, but these errors were encountered: