2

I am using trying to install spacy library using 'pip install -U spacy' in the command prompt (run as admin) in Windows-11 O.S., but it shows some error I don't understand. I am using Python 3.13.0, gcc 13.2.0 and make 4.4.1. What could be the problem? Or is there any other way to install spacy?

C:\>pip install -U spacy
Collecting spacy
  Using cached spacy-3.8.2.tar.gz (1.3 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [113 lines of output]
      Ignoring numpy: markers 'python_version < "3.9"' don't match your environment
      Collecting setuptools
        Using cached setuptools-75.6.0-py3-none-any.whl.metadata (6.7 kB)
      Collecting cython<3.0,>=0.25
        Using cached Cython-0.29.37-py2.py3-none-any.whl.metadata (3.1 kB)
      Collecting cymem<2.1.0,>=2.0.2
        Using cached cymem-2.0.10-cp313-cp313-win_amd64.whl.metadata (8.6 kB)
      Collecting preshed<3.1.0,>=3.0.2
        Using cached preshed-3.0.9.tar.gz (14 kB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Collecting murmurhash<1.1.0,>=0.28.0
        Using cached murmurhash-1.0.11-cp313-cp313-win_amd64.whl.metadata (2.0 kB)
      Collecting thinc<8.4.0,>=8.3.0
        Using cached thinc-8.3.2.tar.gz (193 kB)
        Installing build dependencies: started
        Installing build dependencies: still running...
        Installing build dependencies: finished with status 'error'
        error: subprocess-exited-with-error

        pip subprocess to install build dependencies did not run successfully.
        exit code: 1

        [74 lines of output]
        Ignoring numpy: markers 'python_version < "3.9"' don't match your environment
        Collecting setuptools
          Using cached setuptools-75.6.0-py3-none-any.whl.metadata (6.7 kB)
        Collecting cython<3.0,>=0.25
          Using cached Cython-0.29.37-py2.py3-none-any.whl.metadata (3.1 kB)
        Collecting murmurhash<1.1.0,>=1.0.2
          Using cached murmurhash-1.0.11-cp313-cp313-win_amd64.whl.metadata (2.0 kB)
        Collecting cymem<2.1.0,>=2.0.2
          Using cached cymem-2.0.10-cp313-cp313-win_amd64.whl.metadata (8.6 kB)
        Collecting preshed<3.1.0,>=3.0.2
          Using cached preshed-3.0.9.tar.gz (14 kB)
          Installing build dependencies: started
          Installing build dependencies: finished with status 'done'
          Getting requirements to build wheel: started
          Getting requirements to build wheel: finished with status 'done'
          Preparing metadata (pyproject.toml): started
          Preparing metadata (pyproject.toml): finished with status 'done'
        Collecting blis<1.1.0,>=1.0.0
          Using cached blis-1.0.1.tar.gz (3.6 MB)
          Installing build dependencies: started
          Installing build dependencies: finished with status 'done'
          Getting requirements to build wheel: started
          Getting requirements to build wheel: finished with status 'done'
          Preparing metadata (pyproject.toml): started
          Preparing metadata (pyproject.toml): finished with status 'done'
        Collecting numpy<2.1.0,>=2.0.0
          Using cached numpy-2.0.2.tar.gz (18.9 MB)
          Installing build dependencies: started
          Installing build dependencies: finished with status 'done'
          Getting requirements to build wheel: started
          Getting requirements to build wheel: finished with status 'done'
          Installing backend dependencies: started
          Installing backend dependencies: finished with status 'done'
          Preparing metadata (pyproject.toml): started
          Preparing metadata (pyproject.toml): finished with status 'error'
          error: subprocess-exited-with-error

          Preparing metadata (pyproject.toml) did not run successfully.
          exit code: 1

          [22 lines of output]
          + C:\Users\rohan\AppData\Local\Programs\Python\Python313\python.exe C:\Users\rohan\AppData\Local\Temp\pip-install-s6zj7q4q\numpy_fe36df85b8944a7fb67f6135b78a4bde\vendored-meson\meson\meson.py setup C:\Users\rohan\AppData\Local\Temp\pip-install-s6zj7q4q\numpy_fe36df85b8944a7fb67f6135b78a4bde C:\Users\rohan\AppData\Local\Temp\pip-install-s6zj7q4q\numpy_fe36df85b8944a7fb67f6135b78a4bde\.mesonpy-c4lb8p4h -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\rohan\AppData\Local\Temp\pip-install-s6zj7q4q\numpy_fe36df85b8944a7fb67f6135b78a4bde\.mesonpy-c4lb8p4h\meson-python-native-file.ini
          The Meson build system
          Version: 1.4.99
          Source dir: C:\Users\rohan\AppData\Local\Temp\pip-install-s6zj7q4q\numpy_fe36df85b8944a7fb67f6135b78a4bde
          Build dir: C:\Users\rohan\AppData\Local\Temp\pip-install-s6zj7q4q\numpy_fe36df85b8944a7fb67f6135b78a4bde\.mesonpy-c4lb8p4h
          Build type: native build
          Project name: NumPy
          Project version: 2.0.2
          C compiler for the host machine: gcc (gcc 13.2.0 "gcc (GCC) 13.2.0")
          C linker for the host machine: gcc ld.bfd 2.41
          C++ compiler for the host machine: c++ (gcc 6.3.0 "c++ (MinGW.org GCC-6.3.0-1) 6.3.0")
          C++ linker for the host machine: c++ ld.bfd 2.28
          Cython compiler for the host machine: cython (cython 3.0.11)
          Host machine cpu family: x86
          Host machine cpu: x86
          Program python found: YES (C:\Users\rohan\AppData\Local\Programs\Python\Python313\python.exe)
          Need python for x86, but found x86_64
          Run-time dependency python found: NO (tried sysconfig)

          ..\meson.build:41:12: ERROR: Python dependency not found

          A full log can be found at C:\Users\rohan\AppData\Local\Temp\pip-install-s6zj7q4q\numpy_fe36df85b8944a7fb67f6135b78a4bde\.mesonpy-c4lb8p4h\meson-logs\meson-log.txt
          [end of output]

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

        Encountered error while generating package metadata.

        See above for output.

        note: This is an issue with the package mentioned above, not pip.
        hint: See above for details.
        [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.
      [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.
1
  • gcc in windows? Is it MIGW64? MSYS2? The error is "Host machine cpu: x86; Need python for x86, but found x86_64" Check all your software was compiled for amd64. Commented Dec 7, 2024 at 14:26

4 Answers 4

3

I raised a git issue a couple of months back:

https://github.com/explosion/spaCy/issues/13658#issuecomment-2532080140

They are updating the build system across their packages to use the latest version of cibuildwheel.

python 3.13 is not added completely to their build system yet.

Team is working very hard to make it available on python 3.13

please use python 3.12 for spacy for now.

Sign up to request clarification or add additional context in comments.

Comments

1

I used GCC 32-bit version. So, I installed the 64-bit version and Python 3.12.7. It works.

Comments

-1

This problem is caused by the Python version you are using. Since 3.13 is very new, many libraries may not be suitable for the new version

I also noticed something else "Need python for x86, but found x86_64" maybe it's because of this

Comments

-1

A module cannot find your python executeable program

Try to add your python.exe to %PATH%

Another possibility (Low likelihood):

This module is design for Linux

Try to copy a new python executeable program named python3.exe

3 Comments

Tried that already, didn't work.
python 3.12.7 works.
@RohanVarmaRagula updated

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.