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

List numpy as required dependency? #25

Closed
weiji14 opened this issue Sep 15, 2024 · 1 comment
Closed

List numpy as required dependency? #25

weiji14 opened this issue Sep 15, 2024 · 1 comment

Comments

@weiji14
Copy link
Contributor

weiji14 commented Sep 15, 2024

Hi there,

Just starting the review at openjournals/joss-reviews#7123, and I've followed the installation instructions at https://startinpy.readthedocs.io/0.11.0/installation.html from a clean environment to pip install startinpy. After installation, I tried running a trimmed version of the example at https://startinpy.readthedocs.io/0.11.0/howitworks.html#some-examples-of-the-data-structure-and-infinity:

import startinpy

t = startinpy.DT()
t.insert_one_pt([0.5, 0.5, 1.0])
# (1, True, True)
print(t.points)

and got the following PanicException:

thread '<unnamed>' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/numpy-0.19.0/src/npyffi/array.rs:52:14:
Failed to access NumPy array API capsule: PyErr { type: <class 'ModuleNotFoundError'>, value: ModuleNotFoundError("No module named 'numpy'"), traceback: None }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
pyo3_runtime.PanicException: Failed to access NumPy array API capsule: PyErr { type: <class 'ModuleNotFoundError'>, value: ModuleNotFoundError("No module named 'numpy'"), traceback: None }

The exception is quite clear that numpy is missing, but I'm wondering if it would be good to list numpy as a required dependency in the pyproject.toml here:

[project]
name = "startinpy"
requires-python = ">=3.9"
requires-dist = ["toml>=0.10.2"]
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]

so that numpy will be installed when pip install startinpy is ran? Would there be cases where numpy is not required? (note that I haven't looked through the codebase in detail yet, just reporting some first user experience).

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

2 participants