M
Modular•10mo ago
Krishna

Mojo and Max installation issue

when I am running the commands modular install mojo and modular install max, I am getting the following error as in the picture. WSL 2 Ubuntu 22.04 modular 0.5.1 (1b608e3d)
No description
18 Replies
Ehsan M. Kermani (Modular)
Could you try to uninstall everything and start from scratch including removing the ~/.modular/cache https://docs.modular.com/engine/get-started
Get started with MAX Engine | Modular Docs
Welcome to the MAX Engine setup guide!
nawinkumar
nawinkumar•10mo ago
hi i am getting these errors while installing the max and mojo. i have checked the paths and its perfectly fine with that for python. KDE NEON build on Ubuntu 22.04😩
No description
Ehsan M. Kermani (Modular)
The error says it can't find libpython. Make sure Python >= 3.8 is installed
nawinkumar
nawinkumar•10mo ago
I have python 3.12
Krishna
KrishnaOP•10mo ago
ok, I will try I have just retried it, reinstalled from scratch same issue. @Ehsan M. Kermani
Jack Clayton
Jack Clayton•10mo ago
Hi @Krishna give this a try installing miniconda: https://docs.conda.io/projects/miniconda/en/latest/#quick-command-line-install Make sure you init and activate:
~/miniconda3/bin/conda init --all
conda activate base
~/miniconda3/bin/conda init --all
conda activate base
And run this:
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
modular install mojo
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
modular install mojo
Note that KDE NEON isn't officially supported, and I'm not sure where it puts libpython.so, it might not even have it. But conda comes with libpython so the above should work, just keep in mind that Mojo will be linking to your conda base environment, so if you want to install packages do:
conda activate base
conda install numpy
pip install piponlything
conda activate base
conda install numpy
pip install piponlything
etc. @Krishna that isn't showing the error produced, can you try running the command manually and showing what it outputs:
~/.modular/pkg/packages.modular.com_mojo/venv/bin/python3 -m ensurepip --upgrade --default-pip
~/.modular/pkg/packages.modular.com_mojo/venv/bin/python3 -m ensurepip --upgrade --default-pip
Ehsan M. Kermani (Modular)
Also @Krishna please confirm if you're using WSL2 or WSL1 as the former is supported by MAX
Krishna
KrishnaOP•10mo ago
I am using wsl2
ModularBot
ModularBot•10mo ago
Congrats @Krishna, you just advanced to level 1!
Krishna
KrishnaOP•10mo ago
No description
Krishna
KrishnaOP•10mo ago
/home/kittupriyatham/.modular/pkg/packages.modular.com_mojo/venv/bin/python3: No module named ensurepip
Jack Clayton
Jack Clayton•10mo ago
Hey that should be included with the latest installer if you run this again:
curl https://get.modular.com | sh -
curl https://get.modular.com | sh -
If that doesn't work do:
sudo apt install python3-venv
sudo apt install python3-venv
Then try again
Krishna
KrishnaOP•9mo ago
no it is not working.
PriNova
PriNova•9mo ago
Maybe your system is missing the libpython3.12.so. Install the Python3.12-dev headers: sudo apt install python3.12-dev Then modular install mojo This worked for me. You do not need to export LD_LIBRARY_PATH with this solution. In my case, I installed Python3.12 from the deadsnakes ppa, because of WSL2 VM
Krishna
KrishnaOP•9mo ago
ok. Thank you all very much, finally I have installed the modular max.
Ehsan M. Kermani (Modular)
How did you fix it?
Krishna
KrishnaOP•9mo ago
as said by @PriNova I have added deadsnakeppa and then installed python3.12-dev then, I was able to install the package without any issues directly. I did this on fresh download. Now, I have few doubts, on how to use the max package. to leverage the c, python, and mojo through max and possibility of interlinking of libraries or functionalities between the 3 languages.
PriNova
PriNova•9mo ago
As far as I remember, this issue persisted since the closed beta of Mojo back in summer last year. Installing the Python dev library solved that issue already these days.
Want results from more Discord servers?
Add your server