Skip to content
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

Dependency for numpy not automatically installed if not already installed #31

Open
MatthewWPL opened this issue Dec 9, 2020 · 4 comments

Comments

@MatthewWPL
Copy link

When creating a fresh venv and installing wavespectra in it does not recognise numpy as a dependency and comes up with the error:

ModuleNotFoundError: No module named 'numpy'

Can this be rectified in the next release?

@MatthewWPL
Copy link
Author

Thanks for your email @jorgeperezg,

please see below, when I try to install it on a fresh env... it sees an error that 'No module named numpy'

image

After installing numpy, it then successfully works:

image

@jorgeperezg
Copy link
Member

Thanks @MatthewWPL ,we have the following imports in setup.py:
from numpy.distutils.core import setup
from numpy.distutils.misc_util import Configuration

We'll try to get rid of those or at least improve the installation instructions.

@cmichelenstrofer
Copy link

I think the solution from the second answer here should work.

It would look something like:

from setuptools import dist
dist.Distribution().fetch_build_eggs(['numpy'])

We did this successfully in another project.

@cmichelenstrofer
Copy link

cmichelenstrofer commented Oct 17, 2022

Note that the process suggested above is deprecated soon. The better solution is to switch to the newer pyproject.toml instead of setup.py

DEPRECATION: wavespectra is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants