version solving failed
See original GitHub issue-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option). -
OS version and name: OSX 10.13.6
-
Poetry version: 0.12.3
-
your pyproject.toml file: empty with defaults - no packages added
Issue
poetry add django
is resulting in a SolverProblemError.
[SolverProblemError]
The current supported Python versions are *
Because no versions of django match >2.1,<2.1.1 || >2.1.1,<2.1.2 || >2.1.2,<3.0
and django (2.1) requires Python >=3.5, django is forbidden.
And because django (2.1.1) requires Python >=3.5, django is forbidden.
So, because django (2.1.2) requires Python >=3.5
and poetrytest depends on django (^2.1), version solving failed.
Possible fix
While initializing the virtualenv poetry should use the current python version as the default supported python version rather than “*”.
Furthermore the error still sounds kinda weird and does not actually say that Django cant be installed, because you can either install a Django version for Python2 or one for Python3, but you cant support all Python versions.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
flutter packages get fails, version solving failed - Stack Overflow
Running "flutter packages get" in flutterfoodorderingapp... The current Dart SDK version is 2.1.0-dev.4.0.flutter-050561fd82.
Read more >Version Solving Failed Error after Flutter 2 Upgrade
The simplest solution is if you are doing some important and deadline work and you don't want to take any risk, you can...
Read more >Version solving failed · Issue #21421 · flutter/flutter - GitHub
After updating from version 0.5.1 to 0.7.3 I get this message: The current Dart SDK version is 2.1.0-dev.1.0.flutter-ccb16f7282.
Read more >[Solved]-Version solving failed-Flutter - appsloveworld.com
I just cd to flutter root folder then "git pull origin --ff-only", finally type "flutter upgrade". hoangphucptit 31. Source: stackoverflow.com ...
Read more >SDK version >=2.12.0 <3.3.0, version solving failed - Reddit
0, version solving failed. I've read a bunch of Stack Overflow and tried everything they've ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well, here is the thing: i didnt actively think about the consequences while accepting poetries default of “*” for the compatible python versions. And thats my main point.
Yes, poetry is totally right in refusing to install Django. Im not questioning that. Im saying that by reading the error message its not obviously clear to me that the initial decision (or the lack of) is causing this. And i bet a lot of people are running into that same error.
I kinda answered my own question, why this error is happening, but it still is confusing and caused by poetries default suggestion on init. With a lot of other packages having this split in development for Python2/3 and people still not being aware of problems like the above, why not suggesting another default on init?
Did you mean look? I think you misunderstood me. I dont want to suggest that the resolver should work differently. Hell no! I switched from the horribly broken pipenv, because its working better!
I just want poetry to help its users by suggesting a more sane default on init than *. And the system Python might be a good reference. Dont you think? Or during the init poetry could ask to take either the latest Python 2/3 version while still offering to type whatever Python version they like.
And maybe the mentioned error above could more clearly point out, that package X cant be installed for all python versions. More like: Please change your Python requirement to (in this case) >=3.5 to be able to install Django.
This has been implemented in version
0.12.5
.