Open andersfylling opened 8 months ago
same here, WSL2, windows freshly install
/home/xx/.local/share/mise/installs/poetry/1.8.2/venv/bin/python3: error while loading shared libraries:
/home/xx/.local/share/mise/installs/poetry/1.8.2/venv/bin/../lib/libpython3.12.so.1.0: cannot open shared object file: No such file or directory
/home/din/.local/share/mise/installs/poetry/1.8.2/venv/bin/python3: error while loading shared libraries: /home/din/.local/share/mise/installs/poetry/1.8.2/venv/bin/../lib/libpython3.12.so.1.0: cannot open shared object file: No such file or directory
Traceback:
File "<stdin>", line 923, in main
File "<stdin>", line 562, in run
--force
Can confirm am facing this same issue 😭 @wasdee What is the full command you're running as a workaround?
Can confirm am facing this same issue 😭 @wasdee What is the full command you're running as a workaround?
suppose, I want to use 3.11.1. and i got a pre-compiled one installed. and already install pre-compile pkgs
$ mise settings set python_compile true
# maybe explicitly uninstall first
$ mise install python@3.11.1 --force
$ mise use -g python@3.11.1
$ mise use -g poetry@latest
This is what i vaguely remember.
same issue. i hope this can be fixed soon. as a workaround i installed pipx, then poetry using pipx
the precompiled pythons don't work with poetry. You need to reinstall python after running mise settings set python_compile 1
. I don't know why they don't work with poetry but the issue is upstream.
an upstream issue needs to be filed, it seems. i couldn't find one.
Note, it's not that precompiled Pythons don't work with poetry, it's that precompiled linux-musl
Pythons don't work with poetry. As mentioned in https://github.com/indygreg/python-build-standalone/issues/261 there's some mystery where sometimes mise installs the linux-musl
Python and sometimes installs the linux-gnu
Python.
On this particular laptop it chose linux-gnu
and thus I can install poetry with a prebuilt Python just fine:
% mkdir test
% cd test
% mise u python@3.10
mise installing precompiled python from indygreg/python-build-standalone
mise if you experience issues with this python (e.g.: running poetry), switch to python-build
mise by running: mise settings set python_compile 1
mise python@3.10.14 ✓ installed
mise ~/test/.mise.toml tools: python@3.10.14
mise python@3.10.14 node@20.13.1
% mise u poetry
mise plugin:poetry ✓ https://github.com/mise-plugins/mise-poetry.git#431c335 mise poetry@1.8.3 ✓ installed
mise ~/test/.mise.toml tools: poetry@1.8.3
mise python@3.10.14 poetry@1.8.3 node@20.13.1
% which poetry
/home/egnor/.local/share/mise/installs/poetry/latest/bin/poetry
% poetry --version
Poetry (version 1.8.3)
Yeah, just to clarify: the musl builds have a bunch of limitations (see: https://github.com/indygreg/python-build-standalone/issues/86) -- for example, you can't load shard library-based extension modules.
It would be nice if we could avoid this specific issue in python-build-standalone
(i.e., pip
failing on a dlopen
call), but you generally want to be using the non-musl builds. If the musl builds are being installed, there may be an issue here rather than in python-build-standalone
?
frankly I have no idea what it does, but this change does appear to have fixed this issue for users using mise-poetry: https://github.com/mise-plugins/mise-poetry/commit/431c335b47be548500c50bd631e30a66b4370788
of course if you just pip install poetry
that won't get used though
Interesting... I submitted a PR to pip that I think would avoid this specific failure: https://github.com/pypa/pip/pull/12716. But not sure if it will be accepted or on what timeline it would be released. It should resolve the issue from the python-build-standalone
side though, I think.
is this resolved now? I see that @charliermarsh's PR was merged and I haven't heard reports of this not working
Describe the bug When I tried setting up python and poetry for a project, the poetry install fails with:
To Reproduce
mkdir test && cd test
mise u python@3.10
mise u poetry
This led to the above error. I have never had poetry installed on this machine before, nor mise.
Expected behavior That poetry successfully installed.
mise doctor
outputAdditional context OS: arch linux 6.7.7-arch1-1
edit by @jdx
precompiled pythons are not compatible with poetry. I don't know why but the issue needs to be fixed upstream since the issue is not with mise itself but the pythons mise uses. Here's how to disable precompiled pythons and reinstall: