Closed drhagen closed 1 year ago
The __osx
error is a red herring, caused by the solver going down the wrong path.
Can you please enable the new, experimental, solver message and try again?
https://medium.com/@AntoineProuvost/managing-conflicts-with-mamba-6a5fa10ed6a
I can confirm this, and I just tried adding that flag and it didn't result in any different output.
Dockerized reproducer:
docker run --rm -it mambaorg/micromamba:1.3.1
echo "experimental_sat_error_message: true" >> ~/.condarc
micromamba create -c conda-forge -n issue-84 python=3.11 poetry=1.3.2
But this time I got debugging output:
================== Experimental satisfiability error messages ==================
You are seeing this because you set `experimental_sat_error_message: true`
Use the following issue to share feedback on this experimental feature
https://github.com/mamba-org/mamba/issues/2078
====================================== Legacy messages (old) =======================================
Encountered problems while solving:
- nothing provides __osx needed by poetry-1.3.2-osx_pyhd8ed1ab_0
The environment can't be solved, aborting the operation
=================================== Experimental messages (new) ====================================
The following packages are incompatible
├─ poetry 1.3.2** * is installable with the potential options
│ ├─ poetry 1.3.2 would require
│ │ └─ importlib-metadata >=4.4,<5.0 * with the potential options
│ │ ├─ importlib-metadata [4.10.0|4.10.1|...|4.9.0] would require
│ │ │ └─ python_abi 3.10.* *_cp310 with the potential options
│ │ │ ├─ python_abi 3.10, which can be installed;
│ │ │ └─ python_abi 3.10 would require
│ │ │ └─ python 3.10.* *_cpython, which can be installed;
│ │ ├─ importlib-metadata [4.10.0|4.10.1|...|4.9.0] would require
│ │ │ └─ python_abi 3.7.* *_cp37m with the potential options
│ │ │ ├─ python_abi 3.7, which can be installed;
│ │ │ └─ python_abi 3.7 would require
│ │ │ └─ python 3.7.* *_cpython, which can be installed;
│ │ ├─ importlib-metadata [4.10.0|4.10.1|...|4.9.0] would require
│ │ │ └─ python_abi 3.7 *_pypy37_pp73, which requires
│ │ │ └─ python 3.7.* *_73_pypy, which can be installed;
│ │ ├─ importlib-metadata [4.10.0|4.10.1|...|4.9.0] would require
│ │ │ └─ python_abi 3.8.* *_cp38 with the potential options
│ │ │ ├─ python_abi 3.8, which can be installed;
│ │ │ └─ python_abi 3.8 would require
│ │ │ └─ python 3.8.* *_cpython, which can be installed;
│ │ ├─ importlib-metadata [4.10.0|4.10.1|...|4.9.0] would require
│ │ │ └─ python_abi 3.9.* *_cp39 with the potential options
│ │ │ ├─ python_abi 3.9, which can be installed;
│ │ │ └─ python_abi 3.9 would require
│ │ │ └─ python 3.9.* *_cpython, which can be installed;
│ │ ├─ importlib-metadata [4.11.3|4.11.4] would require
│ │ │ └─ python_abi 3.8 *_pypy38_pp73, which requires
│ │ │ └─ python 3.8.* *_73_pypy, which can be installed;
│ │ ├─ importlib-metadata [4.11.3|4.11.4] would require
│ │ │ └─ python_abi 3.9 *_pypy39_pp73, which requires
│ │ │ └─ python 3.9.* *_73_pypy, which can be installed;
│ │ ├─ importlib-metadata [4.4.0|4.5.0|...|4.8.1] would require
│ │ │ └─ python_abi 3.6.* *_cp36m, which can be installed;
│ │ └─ importlib-metadata [4.4.0|4.5.0] would require
│ │ └─ python_abi 3.6 *_pypy36_pp73, which requires
│ │ └─ python 3.6.* *_73_pypy, which can be installed;
│ ├─ poetry 1.3.2 would require
│ │ └─ __osx * *, which is missing on the system;
│ └─ poetry 1.3.2 would require
│ └─ __win * *, which is missing on the system;
└─ python 3.11** * is uninstallable because it requires.
====================================================================================================
critical libmamba Could not solve for environment specs
For completion, I updated to the latest mamba and enabled the experimental solver. (I thought the experimental solver was mamba, which was only experimental on conda, but whatever). Doing this did not change the output. That being said, @maresb's output suggests that it is actually a missing python_abi
upload for 3.11 that importlib-metadata
needs, and @BastianZim was right about __osx
being a red herring.
Ya, thanks for pointing that out. I didn't notice on first glance.
micromamba create -c conda-forge -n issue-84 python=3.11 "importlib-metadata >4.4,<5.0"
is the root cause.
Hmm, Poetry is not supposed to need importlib-metadata
for Python 3.10 and 3.11, and there is no upper bound on that package regardless. Presumably, there is a reason why this is more restrictive in conda-forge, but I can't find the discussion.
Probably this was done to make it noarch.
Potential solution in https://github.com/conda-forge/importlib_metadata-feedstock/pull/115
Hmm, Poetry is not supposed to need
importlib-metadata
for Python 3.10 and 3.11, and there is no upper bound on that package regardless. Presumably, there is a reason why this is more restrictive in conda-forge, but I can't find the discussion.
Yes, that’s because of noarch. We should remove that upper bound though.
I’m on mobile but can try to put in a PR over the next few days, if the other approach doesn’t work.
Hmm, Poetry is not supposed to need importlib-metadata for Python 3.10 and 3.11, and there is no upper bound on that package regardless.
@drhagen
You are looking at the master
branch but if you look at the latest release tag, there is an upper bound:
https://github.com/python-poetry/poetry/blob/1.3.2/pyproject.toml#L59
We should remove that upper bound though.
@BastianZim, I think we need to wait for a new release for that. If we try to drop the upper bound on this release, it will not pass pip check
.
@maresb, thank you very much for your solution! Building the latest importlib-metadata
< 5 is very much the correct solution here.
@BastianZim, I think we need to wait for a new release for that. If we try to drop the upper bound on this release, it will not pass pip check.
Yes you're right, I didn't see the master. Sorry, shouldn't review on my phone. :)
I think we solved this. It works for me in Docker, but I haven't tested thoroughly. Is everything working now @drhagen?
I can confirm that Poetry 1.3.2 can be installed on Python 3.11. Thanks everybody!
Solution to issue cannot be found in the documentation.
Issue
I cannot install version 1.3.2 of this package alongside Python 3.11, at least not on Linux.
The mamba error suggests that
__osx
is erroneously being listed as a dependency.Strangely, it installs just fine if I specify Python 3.10. These lines in the recipe listing
__osx
as a mandatory runtime dependency are a little funky, but the comment suggests they were added intentionally.Installed packages
Environment info