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

Installation for Python version 3.11 #61

Closed
nik-maheshwari opened this issue Jul 12, 2023 · 4 comments
Closed

Installation for Python version 3.11 #61

nik-maheshwari opened this issue Jul 12, 2023 · 4 comments

Comments

@nik-maheshwari
Copy link

Hi. I am trying to install this library in a Python 3.11 environment. I get the following error -

ERROR: Could not find a version that satisfies the requirement causallib (from versions: none)
ERROR: No matching distribution found for causallib

However, it works for Python 3.9. Are there plans to update the library to be available for Python 3.11?

Thanks.

@ehudkr
Copy link
Collaborator

ehudkr commented Jul 13, 2023

Hi, thanks for bringing this to my attention.
This is indeed strange. I mean, I do test up to Python 3.9 and the PyPI signifier says Python::3.9, but this in and of itself shouldn't block the ability to install causallib on higher Python version.
I also don't seem to be able to replicate this. When I run

conda create -n test_causallib_install_with_py311 python=3.11
conda activate test_causallib_install_with_py311
pip install causallib

I get Successfully installed causallib-0.9.5.

Could you please provide more details so I can try to figure out from where this incompatibility arises?

@nik-maheshwari
Copy link
Author

Hi, thank you for testing it out. And good to know it is working for higher Python versions. I think the errors I am getting is part due to the firewall we have in place for installing some of the dependent packages (tried this in our existing env and a new env). I will sort this out with our IT.

Just something I noticed - causallib has pandas dependency (pandas<2,>=0.25.2). Is there any plan to utilise the newer version of pandas? As our Conda environment is using pandas 2.0.3

@ehudkr
Copy link
Collaborator

ehudkr commented Jul 14, 2023

Yes, the <2 is a guard against non backward-compatible changes in the API when increasing a major version.
From some spare-time fiddling, there doesn't seem to be anything blocking causallib from working with pandas>2, but I haven't formally tested it yet.

If that's the cause of your problems, there might be an annoying workaround in the meantime to manually install causallib's other dependencies (sklearn, matplotlib, etc.), and then install causallib while forcing pip not to install its dependencies: pip install --no-deps causallib (see pip documentation).

@ehudkr
Copy link
Collaborator

ehudkr commented Oct 25, 2023

Pandas >2 is now officially supported, and tests pass on Python 3.11
#65

@ehudkr ehudkr closed this as completed Oct 25, 2023
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