M
Modular16mo ago
marhoy

Installing the Mojo SDK fails

I'm trying to install the Mojo SDK on a Linux server running Debian 12. I have successfully installed the modular package. When running modular install mojo, it seems that the installer is trying to install a pip-install a site-wide python-package(!?), as I'm getting this error:
# Found release for https://packages.modular.com/mojo @ 0.2.1, installing to /home/hoyma/.modular/pkg/packages.modular.com_mojo
# Downloads complete, setting configs...
# Configs complete, running post-install hooks...
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
# Found release for https://packages.modular.com/mojo @ 0.2.1, installing to /home/hoyma/.modular/pkg/packages.modular.com_mojo
# Downloads complete, setting configs...
# Configs complete, running post-install hooks...
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
Using pip to install system-wide packages is not a good thing, as described in PEP 668. I'm using pyenv and pyenv-virtualenv, so I would much rather install the Mojo SDK in an isolated virtual environment with a suitable Python-version. How can I do that? I've tried to create a virtual environment and activate it before running modular install mojo, but that didn't help.
1 Reply
marhoy
marhoyOP16mo ago
OK. By reading a reply to a previous, identical question, I found a solution. I initially activated the virtual environment by using the usual pyenv local virtualenv-name, and that didn't work. But when I instead used pyenv activate virtualenv-name and the modular install mojo, it worked.
Want results from more Discord servers?
Add your server