modularml / mojo

The Mojo Programming Language
https://docs.modular.com/mojo/manual/
Other
23.24k stars 2.6k forks source link

Mojo installation failure #836

Closed Aniketp705 closed 1 year ago

Aniketp705 commented 1 year ago

I'm trying to install mojo since past 3 days but still unable to do so. Please help me! Screenshot (10)

AlmirNeeto99 commented 1 year ago

Mojo installation is currently very slow and sometimes timeout happens. I tried 4 times before I could install it successfully.

Try running modular clean and then try modular install mojo again and again.

AlmirNeeto99 commented 1 year ago

Just to be clear.

They already know it is slow and needs improvement. The solution "try again and again" is needed while itsn't fixed.

BeeCodeB commented 1 year ago

incorrect installation on my Linux system, too:: https://developer.modular.com/download Mojo SDK now available!

~$ sudo apt install curl 
~$ sudo su
~# keyring_location=/usr/share/keyrings/modular-installer-archive-keyring.gpg && curl -1sLf 'https://dl.modular.com/bBNWiLZX5igwHXeu/installer/gpg.0E4925737A3895AD.key' |  gpg --dearmor >> ${keyring_location} && curl -1sLf 'https://dl.modular.com/bBNWiLZX5igwHXeu/installer/config.deb.txt?distro=debian&codename=wheezy'
~# modular auth mut_2ffd1529eac24626a2d85004e4867217 && modular install mojo
~# 
modular clean
modular install mojo
# Found release for https://packages.modular.com/mojo @ 0.2.1, installing to /root/.modular/pkg/packages.modular.com_mojo
modular: error: failure detected - please run `modular clean` and try again
==========================
Failure Information:
    - http error: failed to reach URL https://cas.modular.com/0/bwGpxzsagSwwyZIiua6Ctv_9P1Ih_DcV3nRT-i-kDb4 with cURL error Couldn't resolve host name - Looking for bwGpxzsagSwwyZIiua6Ctv_9P1Ih_DcV3nRT-i-kDb4
    - http error: failed to reach URL https://cas.modular.com/0/oTKHdmePEZWYQfSCosHBqhVuyBllwPfqW3TV3_DSsLY with cURL error Couldn't resolve host name - Looking for oTKHdmePEZWYQfSCosHBqhVuyBllwPfqW3TV3_DSsLY
    - http error: failed to reach URL https://cas.modular.com/0/jbGnFgc0lT64GcFJf2jsxqKtj3mMbVf3WapbZ3hKbWc with cURL error Couldn't resolve host name - Looking for jbGnFgc0lT64GcFJf2jsxqKtj3mMbVf3WapbZ3hKbWc
    - http error: failed to reach URL https://cas.modular.com/0/b3XLf-9OcmEdxntVRZzPaI5BtmFcNxX_ySCaHawHQMo with cURL error Couldn't resolve host name - Looking for b3XLf-9OcmEdxntVRZzPaI5BtmFcNxX_ySCaHawHQMo
    - http error: failed to reach URL https://cas.modular.com/0/bIVLoTLTAivg53c-grik5lQ1HY-g4A3yVSyDjBWeUwM with cURL error Couldn't resolve host name - Looking for bIVLoTLTAivg53c-grik5lQ1HY-g4A3yVSyDjBWeUwM
    - http error: failed to reach URL https://cas.modular.com/0/3iUfZ93vNdShPP9mpNDfs43VYWlD4tZfCJRq2YiUYzw with cURL error Couldn't resolve host name - Looking for 3iUfZ93vNdShPP9mpNDfs43VYWlD4tZfCJRq2YiUYzw
    - http error: failed to reach URL https://cas.modular.com/0/BJFTfga2MkiMnTobzN5AGQqz8JpUj_vb_cedK3UOvKs with cURL error Couldn't resolve host name - Looking for BJFTfga2MkiMnTobzN5AGQqz8JpUj_vb_cedK3UOvKs
    - http error: failed to reach URL https://cas.modular.com/0/ap642MxA33xNU9TNiksI3bu5uDuDFbFM2SiRx8FjkJU with cURL error Couldn't resolve host name - Looking for ap642MxA33xNU9TNiksI3bu5uDuDFbFM2SiRx8FjkJU
    - http error: failed to reach URL https://cas.modular.com/0/Nu1dXa7TduXwZPCjWScIw6KHxvmDS8JBSnruX88Wfxk with cURL error Couldn't resolve host name - Looking for Nu1dXa7TduXwZPCjWScIw6KHxvmDS8JBSnruX88Wfxk
    - http error: failed to reach URL https://cas.modular.com/0/gLvfGiFSMhzXmNVHky64IMrSTs616-AEHVaFLWXQ9hM with cURL error Couldn't resolve host name - Looking for gLvfGiFSMhzXmNVHky64IMrSTs616-AEHVaFLWXQ9hM
    - http error: failed to reach URL https://cas.modular.com/0/rmusYN2cKDMHjTXRptB3ucEj1tqgcCCTTjldGwHZb5I with cURL error Couldn't resolve host name - Looking for rmusYN2cKDMHjTXRptB3ucEj1tqgcCCTTjldGwHZb5I
    - http error: failed to reach URL https://cas.modular.com/0/pDIqVcs30YaV65ZPDjjZ5bu0YxYITpavdZKZx-jkfho with cURL error Couldn't resolve host name - Looking for pDIqVcs30YaV65ZPDjjZ5bu0YxYITpavdZKZx-jkfho
    - http error: failed to reach URL https://cas.modular.com/0/4-3SeOTo12MIWpfERmdj64nltlOVAd_iTkGmeatd0yw with cURL error Couldn't resolve host name - Looking for 4-3SeOTo12MIWpfERmdj64nltlOVAd_iTkGmeatd0yw
    - http error: failed to reach URL https://cas.modular.com/0/5RZf0rQyKwviL27L6G04RXVMaDiO3M8fm2GgiCK3aWU with cURL error Couldn't resolve host name - Looking for 5RZf0rQyKwviL27L6G04RXVMaDiO3M8fm2GgiCK3aWU
    - http error: failed to reach URL https://cas.modular.com/0/-WKofNSqWY0uLYWRthTgJdzgnFgHqkr1gTN2VN1obJg with cURL error Couldn't resolve host name - Looking for -WKofNSqWY0uLYWRthTgJdzgnFgHqkr1gTN2VN1obJg
    - http error: failed to reach URL https://cas.modular.com/0/UPIL1ruIyvACcPFEhM2zaS07qL6HU8X-WwR5STwZNNc with cURL error Couldn't resolve host name - Looking for UPIL1ruIyvACcPFEhM2zaS07qL6HU8X-WwR5STwZNNc
    - http error: failed to reach URL https://cas.modular.com/0/vn75x0oVYP2r8oGs0WCjlqs-SGckYqw08LazHCwEkQ4 with cURL error Couldn't resolve host name - Looking for vn75x0oVYP2r8oGs0WCjlqs-SGckYqw08LazHCwEkQ4
    - http error: failed to reach URL https://cas.modular.com/0/yG42oM4RDivU2dgQgw9TMAkAh_acxAq06mLU7eDJwT8 with cURL error Couldn't resolve host name - Looking for yG42oM4RDivU2dgQgw9TMAkAh_acxAq06mLU7eDJwT8
    - http error: failed to reach URL https://cas.modular.com/0/D7mUAIyMmpJAYMK0Ts4I6fN4C175XwZV2oK0lz5xg1E with cURL error Couldn't resolve host name - Looking for D7mUAIyMmpJAYMK0Ts4I6fN4C175XwZV2oK0lz5xg1E
    - http error: failed to reach URL https://cas.modular.com/0/UGW6-JidxBTt8lSSjlk8fsMiZyANtC1OTJaWHAmE1Is with cURL error Couldn't resolve host name - Looking for UGW6-JidxBTt8lSSjlk8fsMiZyANtC1OTJaWHAmE1Is
    - http error: failed to reach URL https://cas.modular.com/0/itbWmT0wr2sAzPVgnjvNDaeJfnBtB1RAYOH4RnhVpwc with cURL error Couldn't resolve host name - Looking for itbWmT0wr2sAzPVgnjvNDaeJfnBtB1RAYOH4RnhVpwc
    - http error: failed to reach URL https://cas.modular.com/0/wV7G169S1h4IELbu5jHr4SW2raJwSDVItNBRCINYyMo with cURL error Couldn't resolve host name - Looking for wV7G169S1h4IELbu5jHr4SW2raJwSDVItNBRCINYyMo
    - http error: failed to reach URL https://cas.modular.com/0/m0ZaP4BF9UO159jwf44Qt-wDuhxiP7RZHTjylxUNEs8 with cURL error Couldn't resolve host name - Looking for m0ZaP4BF9UO159jwf44Qt-wDuhxiP7RZHTjylxUNEs8
==========================

modular clean
modular install mojo
# Found release for https://packages.modular.com/mojo @ 0.2.1, installing to /root/.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.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
modular: error: failed to run python:
bzcheeseman commented 1 year ago

I suggest creating a virtualenv and installing inside that virtualenv.

affanjau commented 1 year ago

No need to create virtualenv, i was able install mojo by renaming the following python file.

  1. rename /usr/lib/python3.11/EXTERNALLY-MANAGED
  2. modular clean
  3. modular install mojo

make sure to export path and run source command in bash.

BeeCodeB commented 1 year ago

I don't have the folder /EXTERNALLY-MANAGED

I suggest creating a virtualenv and installing inside that virtualenv.

Why would I need a virtual environment, and what do you mean by 'environment' exactly? I have a perfect fine computer system with a good OS install and everything so far runs smooth, besides the Mojo-SDK install attempt inside my succeeded Modular-CLI installation on my computer system .. ;(

AlmirNeeto99 commented 1 year ago

Have you tried after yesterday's update?

BeeCodeB commented 1 year ago

Yes exactly. I saw the mojo update announcement :) But since the mojo-sdk environment install fails inside the Modular-CLI environment, I cannot try it out

AlmirNeeto99 commented 1 year ago

What happens if you clean and try again?

modular clean modular install mojo

BeeCodeB commented 1 year ago

Ah, yes, I filed in an error report, see https://github.com/modularml/mojo/issues/889

AlmirNeeto99 commented 1 year ago

You're using Python 3.11 right? Have you tried using 3.10?

image

BeeCodeB commented 1 year ago

Ah, slipped my eyes. I have installed the old Python 3.10 version, now.

~ $ python3.10 --version
Python 3.10.9
~$ python3.10 -m pip --version
pip 22.3.1 from /usr/local/lib/python3.10/site-packages/pip (python 3.10)

P.S.: but why python 3.10, Cpython 3.11 (released oct 2022) is about 30 times faster?? See what Chris Lattner said on this issue: https://youtu.be/99hRAvk3wIk?si=1bTf-04iqNQfw_tY&t=381

BeeCodeB commented 1 year ago

Still install failure w/Python3.10 due to : cURL error ::

~$ python -V
~$ Python 3.10.9
~$ sudo su
~# modular clean && modular auth mut_2ffd1529eac24626a2d85004e4867217 && modular install mojo
modular: error: http error: failed to reach URL https://cas.modular.com/0/2as2Mizfyhy2k2SWzoCls2siCUueI-uliPRmdhfVtSQ with cURL error Couldn't resolve host name - Looking for 2as2Mizfyhy2k2SWzoCls2siCUueI-uliPRmdhfVtSQ
~# exit
~$ 
jackos commented 1 year ago

The original issue reported is resolved by modular clean and then modular install

There are multiple other issues reported in this ticket, but they're all duplicated, so closing in favor of others: