-
Notifications
You must be signed in to change notification settings - Fork 19
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
ImportError: No module named numpy.distutils.core when installing using pip #76
Comments
I've added an implementation of adding a minimal |
Thanks for the PR. This will be fixed during the next release of iced. |
(Actually, we still need to add the pyproject.toml to the tarball, so I'm reopening this ticket.) |
Thanks for catching that and apologies that I did not catch it - I was testing my PR by installing using Just now, I tried first building the sdist ( I've opened a new PR (sorry for the confusion!) to include |
No problem! I was reopening the ticket in order to not forget about adding this to the manifest file. Thanks a lot for the contributions! |
When installing iced using pip:
The issue appears to be related to numpy not being present before iced is installed. This specific example is intended to be a minimal example and is somewhat contrived, but the same issue arises when doing a standard
pip install -r requirements.txt
with a requirements.txt file that includes both iced and numpy: pip builds wheels for all packages first before installing any packages, so even though the requirements.txt file includes numpy, pip will attempt to build the wheel for iced before numpy is installed.A typical "old-school" workaround is to perform the installation in two steps, e.g.:
It is possible to avoid this extra step and recover the simplicity of "
pip install -r requirements.txt
" by declaring that the installation depends on numpy using PEP 518. The implementation for this could simply be to add apyproject.toml
file with the following contents:This would have no impact on users using older versions of the Python packaging tools (these older versions just ignore
pyproject.toml
), but users using newer versions would be able to directly install iced using pip without knowing anything about the confusing history of Python packaging.The text was updated successfully, but these errors were encountered: