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

Compatibility issue: Error reporting when installing Mojo in Rye-managed Python #920

Open
hhstore opened this issue Mar 22, 2024 · 0 comments

Comments

@hhstore
Copy link

hhstore commented Mar 22, 2024

Steps to Reproduce

issue:

  • When I use rye to manage Python versions, I get an error when installing mojo.
  • Switch to pyenv to manage the Python version, and install mojo without errors.
  • I wonder what are the differences between rye and pyenv in terms of managing Python versions? What's changed?
  • Is there a way to support mojo?

Related (Mojo Project)

Expected Result

  • Under the Python version managed by rye, mojo can be installed successfully.

Actual Result

error logs:

image

modular clean && modular install mojo --force-cas

# Found release for https://packages.modular.com/mojo @ 24.1.1-0ab415f7-release
# Collecting necessary files...
[files    124/124][bytes    118MiB/118MiB @  10.5MiB/s][██████████████████████████████] 💯%
# Downloads complete, setting configs...
# Configs complete, running post-install hooks...
Traceback (most recent call last):
  File "/Users/dev/.modular/pkg/packages.modular.com_mojo/scripts/post-install/pick_python.py", line 67, in <module>
    main()
  File "/Users/dev/.modular/pkg/packages.modular.com_mojo/scripts/post-install/pick_python.py", line 50, in main
    raise Exception(
Exception: Could not find libpython. Check your Python installation and ensure that $LD_LIBRARY_PATH includes the location to the installed Python library (e.g. /usr/lib/x86_64-linux-gnu).
modular: error: failed to run script
==========================
Failure Information:
	- Script: `PATH=/Users/dev/.pyenv/bin:/opt/homebrew/opt/llvm/bin:/Users/dev/.rye/shims:/Users/dev/google-cloud-sdk/bin:/Users/dev/Library/pnpm:/Users/dev/.cargo/bin:/Users/dev/Library/Caches/fnm_multishells/70445_1710899384616/bin:/Users/dev/.pyenv/shims:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/opt/llvm/bin:/usr/local/bin:/Library/Apple/usr/bin:/opt/homebrew/sbin:/opt/homebrew/bin:/Users/dev/bin:/Users/dev/.local/bin:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/bin:/Applications/Little Snitch.app/Contents/Components:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:~/.fig/bin:~/.fnm:~/.cargo/bin:~/.local/bin:~/.yarn/bin:~/.pulumi/bin:/Users/dev/go/bin:~/sdk/android/emulator:~/sdk/android/tools:~/sdk/android/tools/bin:~/sdk/android/platform-tools:/Users/dev/Library/Android/sdk/emulator:/Users/dev/Library/Android/sdk/tools:/Users/dev/Library/Android/sdk/tools/bin:/Users/dev/Library/Android/sdk/platform-tools:/Users/dev/.gem/bin:/Users/dev/.modular/pkg/packages.modular.com_mojo/bin:~/.pyenv/bin:~/.pyenv/shims:~/.pyenv/plugins/pyenv-virtualenv/shims:/usr/local/share/dotnet/:/usr/local/share/dotnet//tools:/Users/dev/.pub-cache/bin:/Users/dev/.fvm/default/bin:/Users/dev/.fvm/default/bin/cache/dart-sdk/bin HOME=/Users/dev MODULAR_HOME=/Users/dev/.modular PYTHONPATH=/Users/dev/.modular/pkg/packages.modular.com_mojo/venv/lib/Users/dev/.modular/pkg/packages.modular.com_mojo/venv/bin/python /Users/dev/.modular/pkg/packages.modular.com_mojo/scripts/post-install/pick_python.py -installer-outfile /var/folders/pc/78th99qs10zfzdx_r683t23w0000gn/T/modular-tool-script-redirect-7e8791.tmp`
	- Result: 1
	- Stderr:
Traceback (most recent call last):
  File "/Users/dev/.modular/pkg/packages.modular.com_mojo/scripts/post-install/pick_python.py", line 67, in <module>
    main()
  File "/Users/dev/.modular/pkg/packages.modular.com_mojo/scripts/post-install/pick_python.py", line 50, in main
    raise Exception(
Exception: Could not find libpython. Check your Python installation and ensure that $LD_LIBRARY_PATH includes the location to the installed Python library (e.g. /usr/lib/x86_64-linux-gnu).

Version Info

 rye --version
rye 0.31.0
commit: 0.31.0 (72e239b8f 2024-03-22)
platform: macos (aarch64)
self-python: cpython@3.12.2
symlink support: true
uv enabled: true

Stacktrace

No response

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

1 participant