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

Python range is too narrow #17

Open
EricKolibacz opened this issue May 31, 2023 · 3 comments · Fixed by #18
Open

Python range is too narrow #17

EricKolibacz opened this issue May 31, 2023 · 3 comments · Fixed by #18
Assignees
Labels
bug Something isn't working

Comments

@EricKolibacz
Copy link
Collaborator

Description

When trying to add maxi-lib to a project, and the project is simply set up with python 3.8, poetry will raise an error. Related to #16

Steps to reproduce the behavior

Create a repo and initialize with poetry

poetry init

(and accept default, without adding main and development dependencies)

And then add maxi-lib:

poetry add git+https://github.com/dailab/MAXi-XAI-lib.git

You should get following error:

The current project's Python requirement (>=3.8,<4.0) is not compatible with some of the required packages Python requirement:
  - maxi requires Python >=3.8.0,<3.10, so it will not be satisfied for Python >=3.10,<4.0

Because <repo-name> depends on maxi (0.4.2) @ git+https://github.com/dailab/MAXi-XAI-lib.git@HEAD which requires Python >=3.8.0,<3.10, version solving failed.

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties
    
    For maxi, a possible solution would be to set the `python` property to ">=3.8,<3.10"

Minimum Acceptance Criteria

  • When following the steps above, poetry should not raise an error when adding maxi-lib
@EricKolibacz EricKolibacz added the bug Something isn't working label May 31, 2023
@EricKolibacz
Copy link
Collaborator Author

Interestingly, the suggested solution does not seem to be correct. Two options are probably available:

  • set the python property to ">=3.8,<3.10" but for the repo
  • set the python property of maxi to python = "^3.8"

The second solution should be preferred because the first solution requires intervention of the user. Hence, solution 2 is more user-friendly.

One counter-argument against solution 2:

  • some python 3.8 specific language is used, e.g., type hint format.

Python 3.10 and 3.11 are downwards compatible, if I am not mistaken. So this shouldn't cause any error.

@EricKolibacz EricKolibacz linked a pull request May 31, 2023 that will close this issue
@EricKolibacz
Copy link
Collaborator Author

Tensorflow limits the python version range which causes the version incompatibility of maxi-lib with any freshly initialized poetry project. No solution found on the internet, that's why I posted a question on stackOverflow.

@EricKolibacz
Copy link
Collaborator Author

Let's wait for answer in StackOverflow. Otherwise, the current solution from #18 is most probably the best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants