QwenLM / Qwen2.5-Coder

Qwen2.5-Coder is the code version of Qwen2.5, the large language model series developed by Qwen team, Alibaba Cloud.
3.03k stars 202 forks source link

Problem installing can't find torch 2.4.0 on MacOS #150

Closed andytriboletti closed 1 week ago

andytriboletti commented 2 weeks ago

Problem installing can't find torch 2.4.0

On my mac while installing the requirements:

(base) andrewtriboletti@Andrews-MacBook-Pro qwen % pip install -r requirements.txt
Requirement already satisfied: torch in /Users/andrewtriboletti/.pyenv/versions/3.11.6/lib/python3.11/site-packages (from -r requirements.txt (line 1)) (2.2.2)
Collecting transformers==4.39.1 (from -r requirements.txt (line 2))
  Using cached transformers-4.39.1-py3-none-any.whl.metadata (134 kB)
Collecting accelerate (from -r requirements.txt (line 3))
  Using cached accelerate-1.1.1-py3-none-any.whl.metadata (19 kB)
Collecting safetensors (from -r requirements.txt (line 4))
  Using cached safetensors-0.4.5-cp311-cp311-macosx_10_12_x86_64.whl.metadata (3.8 kB)
Collecting vllm (from -r requirements.txt (line 5))
  Using cached vllm-0.6.3.post1.tar.gz (2.7 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      Collecting cmake>=3.26
        Using cached cmake-3.31.0-py3-none-macosx_10_10_universal2.whl.metadata (6.4 kB)
      Collecting ninja
        Using cached ninja-1.11.1.1-py2.py3-none-macosx_10_9_universal2.macosx_10_9_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl.metadata (5.3 kB)
      Collecting packaging
        Using cached packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
      Collecting setuptools>=61
        Using cached setuptools-75.3.0-py3-none-any.whl.metadata (6.9 kB)
      Collecting setuptools-scm>=8.0
        Using cached setuptools_scm-8.1.0-py3-none-any.whl.metadata (6.6 kB)
      ERROR: Could not find a version that satisfies the requirement torch==2.4.0 (from versions: 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2)
      ERROR: No matching distribution found for torch==2.4.0
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
cyente commented 2 weeks ago

please give us detail information about your system and env.

andytriboletti commented 2 weeks ago

Running env on my mac:

(base) andrewtriboletti@Andrews-MacBook-Pro ~ % env
TERM_SESSION_ID=w0t0p0:FFE9FC53-BEB0-4E70-B432-5F645B853189
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.1kwlgF6a2P/Listeners
LC_TERMINAL_VERSION=3.5.5
COLORFGBG=0;15
ITERM_PROFILE=Default
XPC_FLAGS=0x0
LANG=en_US.UTF-8
PWD=/Users/andrewtriboletti
SHELL=/bin/zsh
__CFBundleIdentifier=com.googlecode.iterm2
TERM_FEATURES=T3LrMSc7UUw9Ts3BFGsSyHNoSxF
TERM_PROGRAM_VERSION=3.5.5
TERM_PROGRAM=iTerm.app
PATH=/Users/andrewtriboletti/.pyenv/shims:/Users/andrewtriboletti/.pyenv/bin:/Users/andrewtriboletti/miniconda3/bin:/Users/andrewtriboletti/miniconda3/condabin:/Library/Frameworks/Python.framework/Versions/3.11/bin:/Library/Frameworks/Python.framework/Versions/3.12/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/andrewtriboletti/Library/Android/sdk/emulator:/Users/andrewtriboletti/Library/Android/sdk/platform-tools:/usr/local/bin:/Users/andrewtriboletti/Library/Android/sdk/platform-tools:/Users/andrewtriboletti/Library/Android/sdk/build-tools/33.0.1:/Users/andrewtriboletti/Library/Android/sdk/tools/bin:/Users/andrewtriboletti/Library/Android/sdk/platform-tools:/Users/andrewtriboletti/Library/Android/sdk/tools:/Users/andrewtriboletti/Library/Android/sdk/tools/bin:/Users/andrewtriboletti/Library/Android/sdk/emulator:/Users/andrewtriboletti/usd/USD/local_install/bin:/Users/andrewtriboletti/Library/Android/sdk/emulator:/Users/andrewtriboletti/Library/Android/sdk/platform-tools
LC_TERMINAL=iTerm2
COLORTERM=truecolor
COMMAND_MODE=unix2003
TERM=xterm-256color
TERMINFO_DIRS=/Applications/iTerm.app/Contents/Resources/terminfo:/usr/share/terminfo
HOME=/Users/andrewtriboletti
TMPDIR=/var/folders/dp/42dw71cs74b926rpytw0829r0000gn/T/
USER=andrewtriboletti
XPC_SERVICE_NAME=0
LOGNAME=andrewtriboletti
ITERM_SESSION_ID=w0t0p0:FFE9FC53-BEB0-4E70-B432-5F645B853189
__CF_USER_TEXT_ENCODING=0x0:0:0
SHLVL=1
OLDPWD=/Users/andrewtriboletti
ANDROID_SDK_ROOT=/Users/andrewtriboletti/Library/Android/sdk
ANDROID_HOME=/Users/andrewtriboletti/Library/Android/sdk
JAVA_HOME=/Applications/Android Studio.app/Contents/jbr/Contents/Home
NDKROOT=/Users/andrewtriboletti/Library/Android/sdk/ndk/25.1.8937393
NDK_ROOT=/Users/andrewtriboletti/Library/Android/sdk/ndk/25.1.8937393
APP_SECRET=your_secret_value
PYTHONPATH=:/Users/andrewtriboletti/usd/USD/local_install/lib/python
CONDA_EXE=/Users/andrewtriboletti/miniconda3/bin/conda
_CE_M=
_CE_CONDA=
CONDA_PYTHON_EXE=/Users/andrewtriboletti/miniconda3/bin/python
CONDA_SHLVL=1
CONDA_PREFIX=/Users/andrewtriboletti/miniconda3
CONDA_DEFAULT_ENV=base
CONDA_PROMPT_MODIFIER=(base)
PYENV_SHELL=zsh
LDFLAGS=-L/usr/local/opt/pyside@2/lib
CPPFLAGS=-I/usr/local/opt/pyside@2/include
_=/usr/bin/env
andytriboletti commented 2 weeks ago

Running system_profiler

system_profiler SPHardwareDataType SPSoftwareDataType
Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro16,1
      Processor Name: 8-Core Intel Core i9
      Processor Speed: 2.3 GHz
      Number of Processors: 1
      Total Number of Cores: 8
      L2 Cache (per Core): 256 KB
      L3 Cache: 16 MB
      Hyper-Threading Technology: Enabled
      Memory: 16 GB
      System Firmware Version: 2069.40.2.0.0 (iBridge: 22.16.11072.0.0,0)
      OS Loader Version: 582~2132
      Serial Number (system): C02G61AYMD6N
      Hardware UUID: 52E3FC6C-1E2C-5084-A416-B8C1ED449A23
      Provisioning UDID: 52E3FC6C-1E2C-5084-A416-B8C1ED449A23
      Activation Lock Status: Enabled

Software:

    System Software Overview:

      System Version: macOS 15.1 (24B83)
      Kernel Version: Darwin 24.1.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name: Andrew’s MacBook Pro
      User Name: Andrew Triboletti (andrewtriboletti)
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
      Time since boot: 13 days, 19 hours, 29 minutes
andytriboletti commented 2 weeks ago
Python 3.13.0

I also tried other Python versions.

andytriboletti commented 2 weeks ago

Running brew upgrade outputs nothing because I ran it to update all my system's packages, still have an error.

cyente commented 2 weeks ago

https://github.com/vllm-project/vllm/issues/7430

it may because the latest version of vLLM needs v2.4.0, but PyTorch has stopped building MacOS x86_64 binaries since torch v2.3.0.

you may need to use another version.