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 fails because of tensorflow version #1

Open
ani-titan opened this issue Jan 10, 2025 · 11 comments
Open

Installation fails because of tensorflow version #1

ani-titan opened this issue Jan 10, 2025 · 11 comments

Comments

@ani-titan
Copy link

Hi!
Any of the installation methods (listed here: https://causalbgm.readthedocs.io/en/latest/installation.html) fails because of tensorflow specified version:

  1. pip install CausalBGM
    ERROR: Could not find a version that satisfies the requirement tensorflo==2.10.0 (from causalbgm) (from versions: none)
    ERROR: No matching distribution found for tensorflo==2.10.0
  2. pip install git+https://github.com/SUwonglab/CausalBGM.git
    ERROR: git+https://github.com/SUwonglab/CausalBGM.git does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.
    3)git clone https://github.com/SUwonglab/CausalBGM && cd CausalBGM/src
    pip install -e .
    ERROR: Could not find a version that satisfies the requirement tensorflow==2.10.0 (from causalbgm) (from versions: 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0, 2.15.1, 2.16.0rc0, 2.16.1, 2.16.2, 2.17.0rc0, 2.17.0rc1, 2.17.0, 2.17.1, 2.18.0rc0, 2.18.0rc1, 2.18.0rc2, 2.18.0)
    ERROR: No matching distribution found for tensorflow==2.10.0
@kimmo1019
Copy link
Member

kimmo1019 commented Jan 13, 2025

I've fixed the pip installation bugs. Now it can be installed by pip install CausalBGM.

@ani-titan
Copy link
Author

ani-titan commented Jan 14, 2025

sorry, but it's still failing:
ERROR: Cannot install causalbgm==0.1.0 and causalbgm==0.1.3 because these package versions have conflicting dependencies.

The conflict is caused by:
causalbgm 0.1.3 depends on tensorflow==2.10.0
causalbgm 0.1.0 depends on tensorflo==2.10.0

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

@kimmo1019
Copy link
Member

sorry, but it's still failing: ERROR: Cannot install causalbgm==0.1.0 and causalbgm==0.1.3 because these package versions have conflicting dependencies.

The conflict is caused by: causalbgm 0.1.3 depends on tensorflow==2.10.0 causalbgm 0.1.0 depends on tensorflo==2.10.0

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Thank you for reporting the issue. Tensorflow2.10 is recommended as I've tried other version of Tensorflow, but there is slight performance discrepancy.

I've tested in a virtual environment through pip install CausalBGM. It works out fine. After installing it, you can use command line causalBGM --help or use python APIs. Could you please let me know which step is wrong?

@ani-titan
Copy link
Author

I am getting the error when running pip install CausalBGM
image

@kimmo1019
Copy link
Member

I am getting the error when running pip install CausalBGM image

It seems that you have multiple versions of causalbgm, could you try to uninstall them, and try to install pip install CausalBGM==0.1.4, let me know if you have any further issue.

@ani-titan
Copy link
Author

The problem is that the tf version you specified isn't available in pip.
image

@kimmo1019
Copy link
Member

The problem is that the tf version you specified isn't available in pip. image

Thanks for reporting the incombatible program, after investigating, Tensorflow 2.10.0 only supports Python versions up to 3.10. You may need a python from 3.7 to 3.10. Then you should be able to install the package, sorry for the inconvenience. Let me know whether it works, the feedback is very important to me!

@ani-titan
Copy link
Author

Thank you so much! I've been using CausalEGM and I am excited to test CausalBGM.
Unfortunately I am using a special env with python 3.9 as I knew that Tensorflow 2.10.0 wouldn't support >3.11. The problem is that there is no Tensorflow 2.10.0 distribution available in pip.

@ani-titan
Copy link
Author

In CausalEGM you have 'tensorflow>=2.8.0' in settings and it works fine.

@kimmo1019
Copy link
Member

Thank you so much! I've been using CausalEGM and I am excited to test CausalBGM. Unfortunately I am using a special env with python 3.9 as I knew that Tensorflow 2.10.0 wouldn't support >3.11. The problem is that there is no Tensorflow 2.10.0 distribution available in pip.

So happy to know that you are interested in our CausalEGM and CausalBGM works, your feedback is very important. A virtual env with python 3.9 should work with tensorflow 2.10.0. I'm developing CausalBGM with exact python3.9 and tensorflow 2.10

@kimmo1019
Copy link
Member

In CausalEGM you have 'tensorflow>=2.8.0' in settings and it works fine.

Yes, I develop CausalEGM with tensorflow 2.8.0. CausalBGM is a bit tricky as there is some discrepancy with newer tensorflow and tensorflow-probability libraries. In order to make results reproducible, I restrict the environment to be the same as mine.

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