Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: python-poetry package depends on libpython3.12.so.1.0 (Read 259 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

python-poetry package depends on libpython3.12.so.1.0

`pacman -Ss python-poetry`:
Code: [Select]
world/python-poetry 1.8.5-1 [installed]
    Python dependency management and packaging made easy
world/python-poetry-core 1.9.1-1 (python-build-backend) [installed]
    Poetry PEP 517 Build Backend & Core Utilities
world/python-poetry-dynamic-versioning 1.4.1-2
    Plugin for Poetry to enable dynamic versioning based on VCS tags
world/python-poetry-plugin-export 1.8.0-3 [installed]
    Poetry plugin to export the dependencies to various formats
extra/python-poetry 1.8.5-1 [installed]
    Python dependency management and packaging made easy
extra/python-poetry-core 1.9.1-1 (python-build-backend) [installed]
    Poetry PEP 517 Build Backend & Core Utilities
extra/python-poetry-dynamic-versioning 1.4.1-2
    Plugin for Poetry to enable dynamic versioning based on VCS tags
extra/python-poetry-plugin-export 1.8.0-3 [installed]
    Poetry plugin to export the dependencies to various formats
extra/python-poetry-plugin-up 0.8.0-1
    Poetry plugin that updates dependencies and bumps their versions in pyproject.toml file
When running poetry:
Code: [Select]
~> poetry
/home/user/.local/share/pypoetry/venv/bin/python: error while loading shared libraries: libpython3.12.so.1.0: cannot open shared object file: No such file or directory
Package was last updated: 2024-12-26
I tried reinstalling a few times, doesn't seem to help.

Re: python-poetry package depends on libpython3.12.so.1.0

Reply #1
What's your python version?

Re: python-poetry package depends on libpython3.12.so.1.0

Reply #2
Code: [Select]
~> python --version
Python 3.13.1
~>  pacman -Ss ^python\$
system/python 3.13.1-1 [installed]
    The Python programming language

Re: python-poetry package depends on libpython3.12.so.1.0

Reply #3
Actually I see the issue. The python executable it's using is in your venv and that appears to linked to an old libpython3. I'm sure if you reinitialize your venv or force poetry to use the python installed by pacman it'll work.

Re: python-poetry package depends on libpython3.12.so.1.0

Reply #4
Actually I see the issue. The python executable it's using is in your venv and that appears to linked to an old libpython3. I'm sure if you reinitialize your venv or force poetry to use the python installed by pacman it'll work.
for the noobs, how would you do that?

Re: python-poetry package depends on libpython3.12.so.1.0

Reply #5
Python's not really my strong suit. But my guess would be to get rid of ~/.local/share/pypoetry/venv/. Might want to try moving that venv directory before deleting it. This might actually be terrible advice.

Hopefully anyone who runs into this knows how the venv got there and would therefore know how to replace it with a fresh one.

Spoiler (click to show/hide)

Re: python-poetry package depends on libpython3.12.so.1.0

Reply #6
to setup a venv that reliable after python system upgrade, I recommend using a python version manager that bundles python. i.e. uv

 

Re: python-poetry package depends on libpython3.12.so.1.0

Reply #7
to setup a venv that reliable after python system upgrade, I recommend using a python version manager that bundles python. i.e. uv
in my case that's not really an option as the project I'm using uses poetry as a part of it's build system, though I am hyped about uv.

It seems I originally installed poetry with their install script `curl -sSL https://install.python-poetry.org | python3 -`. The script documents that it installs itself in `~/.local/bin/poetry` and `~/.local/share/pypoetry` so I removed those and reinstalled the packages from artix and now everything seems to work. Thanks @corysanin you were right essentially.