modularml / max

A collection of sample programs, notebooks, and tools which highlight the power of the MAX Platform
https://www.modular.com
Other
202 stars 31 forks source link

[BUG]: ModuleNotFoundError: No module named 'max' #121

Closed tgmotz closed 3 months ago

tgmotz commented 3 months ago

Bug description

According to beginner instructions found on "https://docs.modular.com/engine/get-started" the results expected were, input text: Paris is the [MASK] of France. filled mask: Paris is the capital of France.

Instead I received a lot of errors regarding;

  1. "WARNING: The script isympy is installed in '/home/motz/.local/bin' which is not on PATH." 3/4 into the process after executing, "python3 -m pip install -r requirements.txt"
  2. "urllib3 (2.2.1) or chardet (3.0.4) doesn't match a supported version!" after executing "bash run.sh"

Steps to reproduce

Entire paste of CLI from beginning to undesired result pasted below; motz@HOME1:~$ git clone https://github.com/modularml/max.git Cloning into 'max'... remote: Enumerating objects: 1012, done. remote: Counting objects: 100% (455/455), done. remote: Compressing objects: 100% (242/242), done. remote: Total 1012 (delta 319), reused 259 (delta 207), pack-reused 557 Receiving objects: 100% (1012/1012), 1006.82 KiB | 3.03 MiB/s, done. Resolving deltas: 100% (615/615), done. motz@HOME1:~$ cd max/examples/inference/bert-python-torchscript motz@HOME1:~/max/examples/inference/bert-python-torchscript$ python3 -m pip install -r requirements.txt Collecting torch>=2.1.2 Downloading torch-2.2.1-cp38-cp38-manylinux1_x86_64.whl (755.5 MB) |████████████████████████████████| 755.5 MB 23 kB/s Collecting transformers>=4.0.0 Downloading transformers-4.38.2-py3-none-any.whl (8.5 MB) |████████████████████████████████| 8.5 MB 33.4 MB/s Collecting tritonclient[http]>=2.42.0 Downloading tritonclient-2.43.0-py3-none-manylinux1_x86_64.whl (12.4 MB) |████████████████████████████████| 12.4 MB 10.4 MB/s Collecting nvidia-cuda-runtime-cu12==12.1.105; platform_system == "Linux" and platform_machine == "x86_64" Downloading nvidia_cuda_runtime_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (823 kB) |████████████████████████████████| 823 kB 11.3 MB/s Collecting sympy Downloading sympy-1.12-py3-none-any.whl (5.7 MB) |████████████████████████████████| 5.7 MB 11.2 MB/s Collecting filelock Downloading filelock-3.13.1-py3-none-any.whl (11 kB) Collecting fsspec Downloading fsspec-2024.3.0-py3-none-any.whl (171 kB) |████████████████████████████████| 171 kB 11.2 MB/s Collecting nvidia-cudnn-cu12==8.9.2.26; platform_system == "Linux" and platform_machine == "x86_64" Downloading nvidia_cudnn_cu12-8.9.2.26-py3-none-manylinux1_x86_64.whl (731.7 MB) |████████████████████████████████| 731.7 MB 39 kB/s Collecting nvidia-cuda-nvrtc-cu12==12.1.105; platform_system == "Linux" and platform_machine == "x86_64" Downloading nvidia_cuda_nvrtc_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (23.7 MB) |████████████████████████████████| 23.7 MB 11.5 MB/s Collecting nvidia-curand-cu12==10.3.2.106; platform_system == "Linux" and platform_machine == "x86_64" Downloading nvidia_curand_cu12-10.3.2.106-py3-none-manylinux1_x86_64.whl (56.5 MB) |████████████████████████████████| 56.5 MB 11.1 MB/s Requirement already satisfied: jinja2 in /usr/lib/python3/dist-packages (from torch>=2.1.2->-r requirements.txt (line 1)) (2.10.1) Collecting nvidia-cufft-cu12==11.0.2.54; platform_system == "Linux" and platform_machine == "x86_64" Downloading nvidia_cufft_cu12-11.0.2.54-py3-none-manylinux1_x86_64.whl (121.6 MB) |████████████████████████████████| 121.6 MB 12.4 MB/s Collecting nvidia-cusparse-cu12==12.1.0.106; platform_system == "Linux" and platform_machine == "x86_64" Downloading nvidia_cusparse_cu12-12.1.0.106-py3-none-manylinux1_x86_64.whl (196.0 MB) |████████████████████████████████| 196.0 MB 152 kB/s Collecting nvidia-cublas-cu12==12.1.3.1; platform_system == "Linux" and platform_machine == "x86_64" Downloading nvidia_cublas_cu12-12.1.3.1-py3-none-manylinux1_x86_64.whl (410.6 MB) |████████████████████████████████| 410.6 MB 11.7 MB/s Collecting nvidia-nvtx-cu12==12.1.105; platform_system == "Linux" and platform_machine == "x86_64" Downloading nvidia_nvtx_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (99 kB) |████████████████████████████████| 99 kB 2.6 MB/s Collecting typing-extensions>=4.8.0 Downloading typing_extensions-4.10.0-py3-none-any.whl (33 kB) Collecting nvidia-cusolver-cu12==11.4.5.107; platform_system == "Linux" and platform_machine == "x86_64" Downloading nvidia_cusolver_cu12-11.4.5.107-py3-none-manylinux1_x86_64.whl (124.2 MB) |████████████████████████████████| 124.2 MB 10.5 MB/s Collecting nvidia-nccl-cu12==2.19.3; platform_system == "Linux" and platform_machine == "x86_64" Downloading nvidia_nccl_cu12-2.19.3-py3-none-manylinux1_x86_64.whl (166.0 MB) |████████████████████████████████| 166.0 MB 10.0 MB/s Collecting nvidia-cuda-cupti-cu12==12.1.105; platform_system == "Linux" and platform_machine == "x86_64" Downloading nvidia_cuda_cupti_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (14.1 MB) |████████████████████████████████| 14.1 MB 12.2 MB/s Collecting triton==2.2.0; platform_system == "Linux" and platform_machine == "x86_64" and python_version < "3.12" Downloading triton-2.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (167.9 MB) |████████████████████████████████| 167.9 MB 12.5 MB/s Collecting networkx Downloading networkx-3.1-py3-none-any.whl (2.1 MB) |████████████████████████████████| 2.1 MB 23.1 MB/s Collecting huggingface-hub<1.0,>=0.19.3 Downloading huggingface_hub-0.21.4-py3-none-any.whl (346 kB) |████████████████████████████████| 346 kB 11.1 MB/s Collecting regex!=2019.12.17 Downloading regex-2023.12.25-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (777 kB) |████████████████████████████████| 777 kB 11.3 MB/s Requirement already satisfied: pyyaml>=5.1 in /usr/lib/python3/dist-packages (from transformers>=4.0.0->-r requirements.txt (line 2)) (5.3.1) Collecting tokenizers<0.19,>=0.14 Downloading tokenizers-0.15.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB) |████████████████████████████████| 3.6 MB 11.6 MB/s Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from transformers>=4.0.0->-r requirements.txt (line 2)) (2.22.0) Collecting tqdm>=4.27 Downloading tqdm-4.66.2-py3-none-any.whl (78 kB) |████████████████████████████████| 78 kB 7.1 MB/s Collecting numpy>=1.17 Downloading numpy-1.24.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB) |████████████████████████████████| 17.3 MB 10.4 MB/s Collecting packaging>=20.0 Downloading packaging-24.0-py3-none-any.whl (53 kB) |████████████████████████████████| 53 kB 3.1 MB/s Collecting safetensors>=0.4.1 Downloading safetensors-0.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB) |████████████████████████████████| 1.3 MB 11.0 MB/s Collecting python-rapidjson>=0.9.1 Downloading python_rapidjson-1.16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB) |████████████████████████████████| 1.7 MB 11.5 MB/s Collecting urllib3>=2.0.7 Downloading urllib3-2.2.1-py3-none-any.whl (121 kB) |████████████████████████████████| 121 kB 11.0 MB/s Collecting aiohttp<4.0.0,>=3.8.1; extra == "http" Downloading aiohttp-3.9.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB) |████████████████████████████████| 1.3 MB 10.9 MB/s Collecting geventhttpclient<=2.0.2,>=1.4.4; extra == "http" Downloading geventhttpclient-2.0.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (100 kB) |████████████████████████████████| 100 kB 7.4 MB/s Collecting mpmath>=0.19 Downloading mpmath-1.3.0-py3-none-any.whl (536 kB) |████████████████████████████████| 536 kB 11.0 MB/s Collecting nvidia-nvjitlink-cu12 Downloading nvidia_nvjitlink_cu12-12.4.99-py3-none-manylinux2014_x86_64.whl (21.1 MB) |████████████████████████████████| 21.1 MB 10.4 MB/s Requirement already satisfied: attrs>=17.3.0 in /usr/lib/python3/dist-packages (from aiohttp<4.0.0,>=3.8.1; extra == "http"->tritonclient[http]>=2.42.0->-r requirements.txt (line 3)) (19.3.0) Collecting frozenlist>=1.1.1 Downloading frozenlist-1.4.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (240 kB) |████████████████████████████████| 240 kB 10.8 MB/s Collecting aiosignal>=1.1.2 Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB) Collecting multidict<7.0,>=4.5 Downloading multidict-6.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (129 kB) |████████████████████████████████| 129 kB 11.1 MB/s Collecting yarl<2.0,>=1.0 Downloading yarl-1.9.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (308 kB) |████████████████████████████████| 308 kB 11.3 MB/s Collecting async-timeout<5.0,>=4.0; python_version < "3.11" Downloading async_timeout-4.0.3-py3-none-any.whl (5.7 kB) Collecting gevent>=0.13 Downloading gevent-24.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB) |████████████████████████████████| 6.7 MB 11.5 MB/s Requirement already satisfied: six in /usr/lib/python3/dist-packages (from geventhttpclient<=2.0.2,>=1.4.4; extra == "http"->tritonclient[http]>=2.42.0->-r requirements.txt (line 3)) (1.14.0) Collecting brotli Downloading Brotli-1.1.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.8 MB) |████████████████████████████████| 2.8 MB 11.1 MB/s Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from geventhttpclient<=2.0.2,>=1.4.4; extra == "http"->tritonclient[http]>=2.42.0->-r requirements.txt (line 3)) (2019.11.28) Requirement already satisfied: idna>=2.0 in /usr/lib/python3/dist-packages (from yarl<2.0,>=1.0->aiohttp<4.0.0,>=3.8.1; extra == "http"->tritonclient[http]>=2.42.0->-r requirements.txt (line 3)) (2.8) Collecting greenlet>=2.0.0; platform_python_implementation == "CPython" and python_version < "3.11" Downloading greenlet-3.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (667 kB) |████████████████████████████████| 667 kB 11.1 MB/s Requirement already satisfied: zope.interface in /usr/lib/python3/dist-packages (from gevent>=0.13->geventhttpclient<=2.0.2,>=1.4.4; extra == "http"->tritonclient[http]>=2.42.0->-r requirements.txt (line 3)) (4.7.1) Collecting zope.event Downloading zope.event-5.0-py3-none-any.whl (6.8 kB) Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from zope.event->gevent>=0.13->geventhttpclient<=2.0.2,>=1.4.4; extra == "http"->tritonclient[http]>=2.42.0->-r requirements.txt (line 3)) (45.2.0) Installing collected packages: nvidia-cuda-runtime-cu12, mpmath, sympy, filelock, fsspec, nvidia-cublas-cu12, nvidia-cudnn-cu12, nvidia-cuda-nvrtc-cu12, nvidia-curand-cu12, nvidia-cufft-cu12, nvidia-nvjitlink-cu12, nvidia-cusparse-cu12, nvidia-nvtx-cu12, typing-extensions, nvidia-cusolver-cu12, nvidia-nccl-cu12, nvidia-cuda-cupti-cu12, triton, networkx, torch, packaging, tqdm, huggingface-hub, regex, tokenizers, numpy, safetensors, transformers, python-rapidjson, urllib3, frozenlist, aiosignal, multidict, yarl, async-timeout, aiohttp, greenlet, zope.event, gevent, brotli, geventhttpclient, tritonclient WARNING: The script isympy is installed in '/home/motz/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts convert-caffe2-to-onnx, convert-onnx-to-caffe2 and torchrun are installed in '/home/motz/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script tqdm is installed in '/home/motz/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script huggingface-cli is installed in '/home/motz/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts f2py, f2py3 and f2py3.8 are installed in '/home/motz/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script transformers-cli is installed in '/home/motz/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed aiohttp-3.9.3 aiosignal-1.3.1 async-timeout-4.0.3 brotli-1.1.0 filelock-3.13.1 frozenlist-1.4.1 fsspec-2024.3.0 gevent-24.2.1 geventhttpclient-2.0.2 greenlet-3.0.3 huggingface-hub-0.21.4 mpmath-1.3.0 multidict-6.0.5 networkx-3.1 numpy-1.24.4 nvidia-cublas-cu12-12.1.3.1 nvidia-cuda-cupti-cu12-12.1.105 nvidia-cuda-nvrtc-cu12-12.1.105 nvidia-cuda-runtime-cu12-12.1.105 nvidia-cudnn-cu12-8.9.2.26 nvidia-cufft-cu12-11.0.2.54 nvidia-curand-cu12-10.3.2.106 nvidia-cusolver-cu12-11.4.5.107 nvidia-cusparse-cu12-12.1.0.106 nvidia-nccl-cu12-2.19.3 nvidia-nvjitlink-cu12-12.4.99 nvidia-nvtx-cu12-12.1.105 packaging-24.0 python-rapidjson-1.16 regex-2023.12.25 safetensors-0.4.2 sympy-1.12 tokenizers-0.15.2 torch-2.2.1 tqdm-4.66.2 transformers-4.38.2 triton-2.2.0 tritonclient-2.43.0 typing-extensions-4.10.0 urllib3-2.2.1 yarl-1.9.4 zope.event-5.0 motz@HOME1:~/max/examples/inference/bert-python-torchscript$ nano ~/.bashrc motz@HOME1:~/max/examples/inference/bert-python-torchscript$ source ~/.bashrc motz@HOME1:~/max/examples/inference/bert-python-torchscript$ echo $PATH /home/motz/.modular/pkg/packages.modular.com_mojo/bin:/home/motz/.modular/pkg/packages.modular.com_mojo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/Program Files/ImageMagick-7.1.0-Q16-HDRI:/mnt/c/Program Files (x86)/Common Files/Intel/Shared Libraries/redist/intel64/compiler:/mnt/c/windows/system32:/mnt/c/windows:/mnt/c/windows/system32/wbem:/mnt/c/windows/system32/windowspowershell/v1.0/:/mnt/c/windows/system32/openssh/:/mnt/c/program files/nvidia corporation/nvidia nvdlisr:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Users/tgmot/AppData/Local/Tesseract-OCR:/mnt/c/Program Files/gs/gs9.56.1/bin:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/dotnet/:/mnt/c/Users/tgmot/AppData/Local/Programs/Python/Python310/Scripts/:/mnt/c/Users/tgmot/AppData/Local/Programs/Python/Python310/:/mnt/c/Users/tgmot/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files/JetBrains/PyCharm Community Edition 2021.3.1/bin:/mnt/c/Users/tgmot/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin:/home/motz/.local/bin motz@HOME1:~/max/examples/inference/bert-python-torchscript$ bash run.sh

System information

- What OS did you do install MAX on ? 
Ubuntu 20.04.6 LTS

- Provide version information for MAX by pasting the output of max -v`
Command not recognized

- Provide version information for Mojo by pasting the output of mojo -v`
mojo 0.7.0 (af002202)

- Provide Modular CLI version by pasting the output of `modular -v`
modular 0.4.1 (2d8afe15)
tgmotz commented 3 months ago

OMG! I completely looked over the direction to update modular to 0.5.x Please accept my apologies.

tgmotz commented 3 months ago

Max has installed successfully. The instructions on your website are accurate and do not require modification. This was an ID10T issues between the seat and the keyboard.

Thank you.