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

Can't install causalnex using poetry on new Apple M1 chip #188

Open
achuinar opened this issue Nov 22, 2022 · 1 comment
Open

Can't install causalnex using poetry on new Apple M1 chip #188

achuinar opened this issue Nov 22, 2022 · 1 comment

Comments

@achuinar
Copy link

achuinar commented Nov 22, 2022

Description

Trying to install causalnex on new M1 chip using poetry generates the following issue:

Because causalnex (0.11.0) depends on scikit-learn (>=0.22.0,<0.22.2.post1 || >0.22.2.post1,<0.24.1 || >0.24.1,<0.25.0)
 and no versions of causalnex match >0.11.0,<0.12.0, causalnex (>=0.11.0,<0.12.0) requires scikit-learn (>=0.22.0,<0.22.2.post1 || >0.22.2.post1,<0.24.1 || >0.24.1,<0.25.0).
So, because your package depends on both scikit-learn (^1.1.3) and causalnex (^0.11.0), version solving failed.

Unfortunately downgrading the version of scikit-learn generates a numpy compatibility error.

  ImportError: numpy is not installed.
        scikit-learn requires numpy >= 1.11.0.
        Installation instructions are available on the scikit-learn website: http://scikit-learn.org/stable/install.html

Context

I migrated to a new computer that has the Apple M1 chip

Steps to Reproduce

  1. Setting up python environment (in my case: 3.8.15)
  2. Installing poetry globally (installation guide)
  3. Run poetry add causalnex to resolve package dependency and install causalnex

Expected Result

I was expecting causalnex to be compatible with at least scikit-learn 1.1.3

Actual Result

I can't install causalnex.

-- If you received an error, place it here.

poetry add causalnex

Because causalnex (0.11.0) depends on scikit-learn (>=0.22.0,<0.22.2.post1 || >0.22.2.post1,<0.24.1 || >0.24.1,<0.25.0)
 and no versions of causalnex match >0.11.0,<0.12.0, causalnex (>=0.11.0,<0.12.0) requires scikit-learn (>=0.22.0,<0.22.2.post1 || >0.22.2.post1,<0.24.1 || >0.24.1,<0.25.0).
So, because your package depends on both scikit-learn (^1.1.3) and causalnex (^0.11.0), version solving failed.

Your Environment

Include as many relevant details about the environment in which you experienced the bug:

  • CausalNex version used (pip show causalnex):
  • Python version used (python -V): 3.8.15
  • Operating system and version: Apple M1
@zzzzzzzzzzzzz
Copy link
Contributor

Hi @achuinar

Apologize for a late response. Indeed, version 0.11.0 didn’t support sklearn 1+. However, starting from the version 0.11.2 we’ve added support of sklearn 1+. Also, you may consider using 0.12.0. I just tested it with python 3.8.15 and poetry.
For my setup scikit-learn of version 1.2.2 installed.

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