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

Installing poetry fails looking for libpython3.12.dylib #5

Closed
flou opened this issue Jan 30, 2024 · 3 comments
Closed

Installing poetry fails looking for libpython3.12.dylib #5

flou opened this issue Jan 30, 2024 · 3 comments

Comments

@flou
Copy link

flou commented Jan 30, 2024

When trying to install poetry using mise the command fails because it's trying to find the libpython library

I have Python 3.12.1 already installed with mise

$ mise ls
Plugin          Version                   Config Source              Requested
python          3.12.1                    ~/.config/mise/config.toml latest

$ which python
/Users/lou/.local/share/mise/installs/python/latest/bin/python

$ which python3
/Users/lou/.local/share/mise/installs/python/latest/bin/python3

And when I try to install poetry, I have this error from the poetry install script:

$ mise install poetry
mise ~/.local/share/mise/plugins/poetry/bin/install failed
Retrieving Poetry metadata

# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

/Users/lou/.local/share/mise/installs/poetry/1.7.1/bin

You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.

Installing Poetry (1.7.1)
Installing Poetry (1.7.1): Creating environment
Installing Poetry (1.7.1): An error occurred. Removing partial environment.
Poetry installation failed.
See /Users/lou/poetry-installer-error-k116up16.log for error logs.

Cleanup: Something went wrong!

47 /Users/lou/.local/share/mise/plugins/poetry/bin/install: POETRY_HOME=$install_path python3 - --version "$version" $flags
mise ~/.local/share/mise/plugins/poetry/bin/install exited with non-zero status: exit code 250
mise Run with --verbose or MISE_VERBOSE=1 for more information

Looking at the installer logs I see that it's trying to load libpython3.12.dylib

$ cat /Users/lou/poetry-installer-error-k116up16.log
dyld[23548]: Library not loaded: @executable_path/../lib/libpython3.12.dylib
  Referenced from: <C52F33D7-CDE0-3C12-B153-B6C7E6AA1600> /Users/lou/.local/share/mise/installs/poetry/1.7.1/venv/bin/python3
  Reason: tried: '/Users/lou/.local/share/mise/installs/poetry/1.7.1/venv/lib/libpython3.12.dylib' (no such file)

Traceback:

  File "<stdin>", line 923, in main
  File "<stdin>", line 562, in run

The directory /Users/lou/.local/share/mise/installs/poetry is empty but I was able to find a matching dylib in ~/.local/share/mise/

$ fd libpython /Users/lou/.local/share/mise/
/Users/lou/.local/share/mise/installs/python/3.12.1/lib/libpython3.12.dylib
@elementalvoid
Copy link

I just ran into this and a coworker found this upstream issue: python-poetry/install.python-poetry.org#24

I don't know if it makes sense to fix here or not...

@jdx
Copy link
Member

jdx commented Feb 1, 2024

don't use the precompiled binaries

@flou
Copy link
Author

flou commented Feb 1, 2024

Oh yes, thank you, reinstalling Python after running mise settings set python_compile 1 solves it.

@flou flou closed this as completed Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants