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

oldest-supported-numpy depricated #257

Open
sdamrich opened this issue Apr 23, 2024 · 2 comments
Open

oldest-supported-numpy depricated #257

sdamrich opened this issue Apr 23, 2024 · 2 comments

Comments

@sdamrich
Copy link

Hi Pavlin,

for packages that depend on openTSNE, it is somewhat cumbersome that openTSNE requires the oldest supported numpy version for the given python version, because this can easily lead to conflicts. I assume this was needed for the C API. But given the deprecation notice on https://github.com/scipy/oldest-supported-numpy, I wonder if it is still necessary.

@pavlin-policar
Copy link
Owner

pavlin-policar commented Apr 25, 2024

Hi Sebastian, thanks for bringing this up. I wasn't aware of the deprecation of oldest-supported-numpy, so I guess I need to update the dependencies.

However, the oldest-supported-numpy really shouldn't interfere with your environment. oldest-supported-numpy is only used at build-time, i.e., when buliding the wheels on the CI system. When installing, this line is used, so it definitely shouldn't downgrade your numpy version if you run pip install openTSNE.

Could you please list the exact steps that cause the conflict you're experiencing?

@sdamrich
Copy link
Author

sdamrich commented May 6, 2024

Hi Pavlin,
we have a package (ne-spectrum), which depends on openTSNE. It has other dependencies which require a minimal numpy version of at least 1.17. Here is the relevant excerpt from ne-spectrum's pyproject.toml file

dependencies = [
"numpy",
"openTSNE",
"contrastive-ne>=0.3.8",
"matplotlib",
"pillow"
]

When we install ne-spectrum via pip install . and have Python 3.10, we get an error like this:

ERROR: Cannot install contrastive-ne==0.3.8, matplotlib==3.8.4, ne-spectrum and ne-spectrum==0.0.1 because these package versions have conflicting dependencies.

The conflict is caused by:
ne-spectrum 0.0.1 depends on numpy
contrastive-ne 0.3.8 depends on numpy>=1.17
matplotlib 3.8.4 depends on numpy>=1.21
opentsne 0.3.9 depends on numpy==1.16.*

openTSNE requires a pretty exact, old numpy version. Moreover, when we try the same thing in an environment that has Python 3.12, there is no error. Therefore, I thought this to be due to oldest-supported-numpy (newer Python --> newer oldest-supported-numpy). We simply went with requiring python>=3.12 for our ne-spectrum.

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