-
Notifications
You must be signed in to change notification settings - Fork 154
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
error when install wrf-python #237
Comments
I haven't examined the source code but from my own testing I surmise a couple of things going on here. First, wrf-python does not play nice with build isolation. If you look up the stack trace you will see "No module named pip" In my case I am using uv and I disable build isolation with --no-build-isolation and then the legacy installer will complain that I need pip installed, and then it will complain that I need wheel installed, and lastly on Windows without compilers will fail when it attempts to compile (if you have "Microsoft C++ Build Tools" on Windows it should succeed here, or if you are on Linux it should succeed here). However, requiring pip and wheel in your virtual environment is inconvenient and will cause issues with many modern tools that assume the packages can be installed with build isolation. Second, wrf-python still relies on distutils, deprecated after numpy 1.23 and fully removed in 1.26. So to even get as far as the above suggestion will get, you need to install numpy<1.26 I would also say that #42 precompiled wheels issues open since 2017 would likely resolve these issues |
Line 14 in cec1f70
I thought pip only enabled build isolation if it found EDIT: Just re-read the text, using uv instead of pip. The failure without compilers is expected, wrf-python not putting numpy into setuptools's old EDIT: Workarounds: comment out line 14 of setup.py above, ensure you have numpy, setuptools, and wheel installed in the build environement, and disable build isolation. Alternately, use the
Specifically on NumPy distutils, which looks like it's around for another year on python 3.11 and will never be on 3.12, so there's an argument for That link proposes suggestions for migrating the build for python 3.12, specifically meson through meson-python or CMake using scikit-build-core, if anyone wants to try for a PR (#242 for CMake). |
I am facing the same issue and exhaused all method. When can this issue be resolved? (venv) PS E:\Python > pip install wrf-python × python setup.py bdist_wheel did not run successfully.
note: This error originates from a subprocess, and is likely not a problem with pip. |
From your logs: error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ I would think the problem is more "don't have C++ installed" than "don't have numpy installed", and would suggest you make sure you have the proper C and Fortran compilers installed somewhere pip/distutils can find them. If that is not something you can do, I would suggest using |
Hi there ! I'm also trying to have I have been testing PR241 (migrating wrf-python to pyproject.toml) unsuccessfully. Here is the pip install from sources output:
I see many files in wrf-python still referencing Any suggestion? Anyone got |
Error when i use pip to install wrf-python:
I try to install it through source code referencing to documentation, but it still raised the same error
And i'm 100% percent sure that i have numpy in my virtualenv(created by poetry), and i run
pip install wrf-python
while the virtualenv is activated(in thepoetry shell
)The text was updated successfully, but these errors were encountered: