Comments (12)
I have same issue on M1 Monterey.
modular clean
and the run modular install mojo
takes same error.
Can you run
modular clean
and the runmodular install mojo
again?
from mojo.
Also one thing we can try if you are willing to do an experiment for me is to run this and see if that works?
modular clean
modular install mojo --force-cas
That forces a deprecated package download method that is still used on older packages and is going away soon.
We are not seeing this error with high frequency but I'm still curious if that method works for you.
from mojo.
@zbowling Thanks! This way with addition flag works.
Mojo was installed without error.
*Earlier an error occurred on modular version 0.5.2.
from mojo.
@zbowling any update? Is that any extra information I could provide to boost the process?
from mojo.
Can you run modular clean
and the run modular install mojo
again?
from mojo.
same here. re run both still encounter same error.
from mojo.
can you tell me what version of modular you are running with modular --version
? The most recent version is 0.5.2. It might not fix the issue being on the latest but I can check more telemetry on our end of this type of bug when it happens on that version.
from mojo.
@zbowling . Add flag works! However, I still use modular 0.5.1 to test it first. Many thanks! Let's close the issue.
from mojo.
Could it be because mojo doesn't support rye?
- not works for me.
- This may be caused by me using rye (Python package management tool) to manage Python version numbers.
- I seem to have encountered similar errors before.
- Last time I switched to
pyenv
(notrye
) to switch thePython
version number, and then fixed the problem. - However, I think mojo needs to fix this error in order to support
rye
, which is also a popular Python package management tool lately.
Env:
M1 Mac + macOS 12.4
- python rye
❯ which python
/Users/dev/.rye/shims/python
❯ python -V
Python 3.12.2
Error logs:
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).
==========================
from mojo.
Related:
- #706
- I looked at the
path
of the Python installed byrye
, and found that it is here, and it is indeed different from the path ofpyenv
. (Mojo and pyenv work fine)
$HOME/.rye/py/cpython@3.12.2
- I tried setting the following environment variables, but it didn't work.
export LD_LIBRARY_PATH="/Users/dev/.rye/py/[email protected]/install/lib/"
export LD_LIBRARY_PATH="/Users/dev/.rye/py/[email protected]/lib/libpython3.12.dylib"
Python dir
diff:pyenv
vsrye
Temporary Solution:
- Use
pyenv
instead ofrye
to manage Python versions.
❯ which python
/Users/dev/.pyenv/shims/python
~ on ☁️
❯ python --version | awk '{print $2}'
3.10.6
~ on ☁️
❯ 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 @ 21KiB/s][██████████████████████████████] 💯%
# Downloads complete, setting configs...
# Configs complete, running post-install hooks...
🔥 Mojo installed! 🔥
Mojo's Python virtual environment created at /Users/dev/.modular/pkg/packages.modular.com_mojo/venv
If you are using ZSH (default on macOS), run the following commands:
echo 'export MODULAR_HOME="/Users/dev/.modular"' >> ~/.zshrc
echo 'export PATH="/Users/dev/.modular/pkg/packages.modular.com_mojo/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
If you are using bash, run the following commands:
BASHRC=$( [ -f "$HOME/.bash_profile" ] && echo "$HOME/.bash_profile" || echo "$HOME/.bashrc" )
echo 'export MODULAR_HOME="/Users/dev/.modular"' >> "$BASHRC"
echo 'export PATH="/Users/dev/.modular/pkg/packages.modular.com_mojo/bin:$PATH"' >> "$BASHRC"
source "$BASHRC"
Then enter 'mojo' to start the Mojo REPL.
For tool help, enter 'mojo --help'.
For more docs, see https://docs.modular.com/mojo.
from mojo.
@hhstore I don't think I've tested with Rye. Can you copy your comments to a different bug and open it? It's a different issue than this one and then I can add it to the right team's triage queue.
from mojo.
@hhstore I don't think I've tested with Rye. Can you copy your comments to a different bug and open it? It's a different issue than this one and then I can add it to the right team's triage queue.
- sure. I'll open another issue.
- here: #1991
from mojo.
Related Issues (20)
- [Docs] List/Dict Comprehension Section Outdated HOT 1
- [BUG] Flaky segfault during `mojo build` with `-D MOJO_ENABLE_ASSERTIONS`
- [BUG] alias materialization of list
- [Feature Request] Add memoization decorator
- [BUG] Popping a String from a dictionary then using the value leads to a double free crash.
- [BUG] LSP Crash with basic trait and __contains__
- [Feature Request] Improving the developer experience for new contributors
- [Feature Request] [mojo-lang] [proposal] Make fstring formatting a priority and define what features will be available HOT 1
- [Docs] Indicate which platform a search result is for
- [BUG] Possible stack overflow in compiler for suffiently complex type declaration, hang at lower complexities
- [Feature Request] [stdlib] [proposal] Migrate/wrap `String.join()` methods into `StringLiteral` and add temp dict and list iter args
- [Feature Request] [stdlib] [proposal] Rename `InlineList` to `Array` HOT 3
- mojo-lsp-server crashes in Visual Studio Code
- [Feature Request] Improve ergonomics for writing functions generic across integral scalars. HOT 4
- [stdlib] Support custom prefix for `hex` function HOT 2
- [BUG] Mojo crashes when attempting run `str()` during compilation. HOT 2
- [BUG] Compiler bug of walrus operator with multiple `and`s HOT 12
- [BUG] [nightly 2024.5.2205] Error when hashing `StringLiteral` in `Dict.__setitem__` when building from generic trait
- [BUG] Compiler error when storing function whose input/output types are parameterized in struct
- Optional Flag to Prevent Python Code Execution
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mojo.