termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.33k stars 3.07k forks source link

[Bug]: Python module spacy and chatterbot cannot be installed in Termux(Python) #21046

Closed YanXuHaa closed 3 months ago

YanXuHaa commented 3 months ago

Problem description

I want to install chatterbot with pip But the hint:↓

Collecting spacy<2.2,>=2.1 (from chatterbot)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/1f/e2/46650d03c7ff2b57ed7af211d41c3f606540f7adea92b5af65fcf9f605c0/spacy-2.1.9.tar.gz (30.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 30.7/30.7 MB 2.5 MB/s eta 0:00:00
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 2
  ╰─> [111 lines of output]

The beginning of the Chatterbot1.0.5 installation was smooth, and the final automatic installation spacy-2.1.9.tar.gz (30.7 MB) always gave an error.

So I decided to install spacy manually But still failed as follows:↓

"~ $ pip install spacy
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting spacy
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/21/1e/94e3981516db6fcd6685f058c43c3fa81805c120b04829596367dad1aa4e/spacy-3.7.5.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
  ╰─> [138 lines of output]
      Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
      Ignoring numpy: markers 'python_version < "3.9"' don't match your environment
      Collecting setuptools
        Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e1/58/e0ef3b9974a04ce9cde2a7a33881ddcb2d68450803745804545cdd8d258f/setuptools-72.1.0-py3-none-any.whl (2.3 MB)
      Collecting cython<3.0,>=0.25
        Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7e/26/9d8de10005fedb1eceabe713348d43bae1dbab1786042ca0751a2e2b0f8c/Cython-0.29.37-py2.py3-none-any.whl (989 kB)
      Collecting cymem<2.1.0,>=2.0.2
        Using cached cymem-2.0.8-cp39-cp39-linux_aarch64.whl
      Collecting preshed<3.1.0,>=3.0.2
        Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f2/4e/76dbf784e7d4ed069f91a4c249b1d6ec6856ef0c0b2fd96992895d458b15/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.10-cp39-cp39-linux_aarch64.whl
      Collecting thinc<8.3.0,>=8.2.2
        Using cached https://pypi.tuna.tsinghua.edu.cn/packages/3b/2a/0e2e961e6152bedecca70e6833f6e827ee621efcee7496643242b506d54f/thinc-8.2.5.tar.gz (193 kB)
        Installing build dependencies: started
        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
        ╰─> [101 lines of output]
            Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
            Ignoring numpy: markers 'python_version < "3.9"' don't match your environment
            Collecting setuptools
              Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e1/58/e0ef3b9974a04ce9cde2a7a33881ddcb2d68450803745804545cdd8d258f/setuptools-72.1.0-py3-none-any.whl (2.3 MB)
            Collecting cython<3.0,>=0.25
              Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7e/26/9d8de10005fedb1eceabe713348d43bae1dbab1786042ca0751a2e2b0f8c/Cython-0.29.37-py2.py3-none-any.whl (989 kB)
            Collecting murmurhash<1.1.0,>=1.0.2
              Using cached murmurhash-1.0.10-cp39-cp39-linux_aarch64.whl
            Collecting cymem<2.1.0,>=2.0.2
              Using cached cymem-2.0.8-cp39-cp39-linux_aarch64.whl
            Collecting preshed<3.1.0,>=3.0.2
              Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f2/4e/76dbf784e7d4ed069f91a4c249b1d6ec6856ef0c0b2fd96992895d458b15/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<0.8.0,>=0.7.8
              Using cached https://pypi.tuna.tsinghua.edu.cn/packages/51/8c/60c85350f2e1c9647df580083a0f6acc686ef32d1a91f4ab0c624b3ff867/blis-0.7.11.tar.gz (2.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 'error'
              error: subprocess-exited-with-error

              × Getting requirements to build wheel did not run successfully.
              │ exit code: 1
              ╰─> [62 lines of output]
                  Traceback (most recent call last):
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-d5wo52bw/overlay/lib/python3.9/site-packages/numpy/_core/__init__.py", line 23, in <module>
                      from . import multiarray
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-d5wo52bw/overlay/lib/python3.9/site-packages/numpy/_core/multiarray.py", line 10, in <module>
                      from . import overrides
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-d5wo52bw/overlay/lib/python3.9/site-packages/numpy/_core/overrides.py", line 8, in <module>
                      from numpy._core._multiarray_umath import (
                  ImportError: dlopen failed: cannot locate symbol "PyExc_ValueError" referenced by "/data/data/com.termux/files/usr/tmp/pip-build-env-d5wo52bw/overlay/lib/python3.9/site-packages/numpy/_core/_multiarray_umath.cpython-39.so"...

                  During handling of the above exception, another exception occurred:

                  Traceback (most recent call last):
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-d5wo52bw/overlay/lib/python3.9/site-packages/numpy/__init__.py", line 114, in <module>
                      from numpy.__config__ import show as show_config
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-d5wo52bw/overlay/lib/python3.9/site-packages/numpy/__config__.py", line 4, in <module>
                      from numpy._core._multiarray_umath import (
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-d5wo52bw/overlay/lib/python3.9/site-packages/numpy/_core/__init__.py", line 49, in <module>
                      raise ImportError(msg)
                  ImportError:

                  IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

                  Importing the numpy C-extensions failed. This error can happen for
                  many reasons, often due to issues with your setup or how NumPy was
                  installed.

                  We have compiled some common reasons and troubleshooting tips at:

                      https://numpy.org/devdocs/user/troubleshooting-importerror.html

                  Please note and check the following:

                    * The Python version is: Python3.9 from "/data/data/com.termux/files/usr/bin/python"
                    * The NumPy version is: "2.0.1"

                  and make sure that they are the versions you expect.
                  Please carefully study the documentation linked above for further help.

                  Original error was: dlopen failed: cannot locate symbol "PyExc_ValueError" referenced by "/data/data/com.termux/files/usr/tmp/pip-build-env-d5wo52bw/overlay/lib/python3.9/site-packages/numpy/_core/_multiarray_umath.cpython-39.so"...

                  The above exception was the direct cause of the following exception:

                  Traceback (most recent call last):
                    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
                      main()
                    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
                      json_out['return_val'] = hook(**hook_input['kwargs'])
                    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
                      return hook(config_settings)
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-d5wo52bw/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
                      return self._get_build_requires(config_settings, requirements=[])
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-d5wo52bw/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
                      self.run_setup()
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-d5wo52bw/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 313, in run_setup
                      exec(code, locals())
                    File "<string>", line 23, in <module>
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-d5wo52bw/overlay/lib/python3.9/site-packages/numpy/__init__.py", line 119, in <module>
                      raise ImportError(msg) from e
                  ImportError: Error importing numpy: you should not try to import numpy from
                          its source directory; please exit the numpy source tree, and relaunch
                          your python interpreter from there.
                  [end of output]

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

            × Getting requirements to build wheel 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.
      [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."

That's all there is.

I searched many websites but still didn't get anything So I can only post my first issue here

I'm not familiar with the rules for issuing issues.I hope I haven't broken any hidden rules If there is hope to forgive:) (All English is machine translation)

What steps will reproduce the bug?

Maybe that's

pip install spacy

I'm not sure, because I just came into contact with Termux and python

What is the expected behavior?

Correct installation of spacy and chatterbot

System information

~ $ termux-info
Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=GITHUB
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=21788
TERMUX_IS_DEBUGGABLE_BUILD=1
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.1
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirrors.zju.edu.cn/termux/apt/termux-main stable main
# sources.list.d/rendiix.list
deb https://rendiix.github.io android-tools termux
# sources.list.d/pointless.list
deb https://its-pointless.github.io/files/21 termux extras
# root-repo (sources.list.d/root.list)
deb https://mirrors.zju.edu.cn/termux/apt/termux-root root stable
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
# x11-repo (sources.list.d/x11.list)
deb https://mirrors.zju.edu.cn/termux/apt/termux-x11 x11 main
Updatable packages:
python/stable 3.11.9-3 aarch64 [upgradable from: 3.9.7]
termux-tools version:
1.43.2
Android version:
14
Kernel build information:
Linux localhost 5.15.137-android13-8-ge592aa1e6f2f-dirty #1 SMP PREEMPT Thu Jul 4 12:50:12 UTC 2024 aarch64 Android
Device manufacturer:
vivo
Device model:
V2302A
LD Variables:
LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib/openssl-1.1
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.widget versionCode:13
Biswa96 commented 3 months ago

Please try to update all the packages with apt update; apt upgrade command.

licy183 commented 3 months ago

export LDFLAGS="-lpython3.11" and try again.

YanXuHaa commented 3 months ago

Be ineffective

licy183 commented 3 months ago

python3.9 is not maintained by the main repo since Oct 6, 2021. Please check whether your pip is pointing to python3.11. Post the output of cat $(command -v pip).

YanXuHaa commented 3 months ago

python3.9 is not maintained by the main repo since Oct 6, 2021. Please check whether your pip is pointing to python3.11. Post the output of cat $(command -v pip).

I'm not sure what you mean

But if I'm not mistaken, Here is the execution results for cat $(command -v pip)

~ $ cat $(command -v pip)
#!/data/data/com.termux/files/usr/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal.cli.main import main
if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(main())
licy183 commented 3 months ago

It seems that you've installed python=3.9 rather than python=3.11. You should upgrade python to 3.11 as python3.9 is not maintained anymore. Is there any specific reason why python cannot be upgraded?

看上去你安装了 python3.9 而不是 python3.11,应该把 python3.9 升级到 python3.11,3.9 现在已经不在主仓库受到支持了。有啥特别的原因不能升级 python 吗?

YanXuHaa commented 3 months ago

It seems that you've installed python=3.9 rather than python=3.11. You should upgrade python to 3.11 as python3.9 is not maintained anymore. Is there any specific reason why python cannot be upgraded?

看上去你安装了 python3.9 而不是 python3.11,应该把 python3.9 升级到 python3.11,3.9 现在已经不在主仓库受到支持了。有啥特别的原因不能升级 python 吗?

因为我从网上查, spacy不支持新版本python(python=3.11) 于是我降级到了python=3.9

错的吗难道是 但事实上,我即使在python=3.11中也无法安装spacy

Because I looked it up on the Internet, Spacy does not support new version of python So I downgraded to python3.9

Is this wrong? In fact, I couldn't install spacy even in version 3.11

licy183 commented 3 months ago

I haven't used spacy so I have no idea about this. But if python3.9 is installed on Termux, it may break the functions of other packages. Termux is a rolling distribution, and there is no guarantee that old packages can work normally. If you know what you're doing, try export LDFLAGS="-lpython3.9" before pip install spacy.

我也不清楚,我没用过 spacy。如果你安装了 python3.9 的话会破坏其它软件包的功能。Termux 是滚动更新的发行版,并不保证旧版本的软件能够正常运行。如果你能接受的话,在 pip install spacyexport LDFLAGS="-lpython3.9" 试试。

YanXuHaa commented 3 months ago

I haven't used spacy so I have no idea about this. But if python3.9 is installed on Termux, it may break the functions of other packages. Termux is a rolling distribution, and there is no guarantee that old packages can work normally. If you know what you're doing, try export LDFLAGS="-lpython3.9" before pip install spacy.

我也不清楚,我没用过 spacy。如果你安装了 python3.9 的话会破坏其它软件包的功能。Termux 是滚动更新的发行版,并不保证旧版本的软件能够正常运行。如果你能接受的话,在 pip install spacyexport LDFLAGS="-lpython3.9" 试试。

~ $ export LDFLAGS="-lpython3.9"
~ $ LDFLAGS="-lpython3.9" pip install spacy
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting spacy
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/21/1e/94e3981516db6fcd6685f058c43c3fa81805c120b04829596367dad1aa4e/spacy-3.7.5.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
  ╰─> [138 lines of output]
      Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
      Ignoring numpy: markers 'python_version < "3.9"' don't match your environment
      Collecting setuptools
        Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e1/58/e0ef3b9974a04ce9cde2a7a33881ddcb2d68450803745804545cdd8d258f/setuptools-72.1.0-py3-none-any.whl (2.3 MB)
      Collecting cython<3.0,>=0.25
        Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7e/26/9d8de10005fedb1eceabe713348d43bae1dbab1786042ca0751a2e2b0f8c/Cython-0.29.37-py2.py3-none-any.whl (989 kB)
      Collecting cymem<2.1.0,>=2.0.2
        Using cached cymem-2.0.8-cp39-cp39-linux_aarch64.whl
      Collecting preshed<3.1.0,>=3.0.2
        Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f2/4e/76dbf784e7d4ed069f91a4c249b1d6ec6856ef0c0b2fd96992895d458b15/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.10-cp39-cp39-linux_aarch64.whl
      Collecting thinc<8.3.0,>=8.2.2
        Using cached https://pypi.tuna.tsinghua.edu.cn/packages/3b/2a/0e2e961e6152bedecca70e6833f6e827ee621efcee7496643242b506d54f/thinc-8.2.5.tar.gz (193 kB)
        Installing build dependencies: started
        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
        ╰─> [101 lines of output]
            Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
            Ignoring numpy: markers 'python_version < "3.9"' don't match your environment
            Collecting setuptools
              Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e1/58/e0ef3b9974a04ce9cde2a7a33881ddcb2d68450803745804545cdd8d258f/setuptools-72.1.0-py3-none-any.whl (2.3 MB)
            Collecting cython<3.0,>=0.25
              Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7e/26/9d8de10005fedb1eceabe713348d43bae1dbab1786042ca0751a2e2b0f8c/Cython-0.29.37-py2.py3-none-any.whl (989 kB)
            Collecting murmurhash<1.1.0,>=1.0.2
              Using cached murmurhash-1.0.10-cp39-cp39-linux_aarch64.whl
            Collecting cymem<2.1.0,>=2.0.2
              Using cached cymem-2.0.8-cp39-cp39-linux_aarch64.whl
            Collecting preshed<3.1.0,>=3.0.2
              Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f2/4e/76dbf784e7d4ed069f91a4c249b1d6ec6856ef0c0b2fd96992895d458b15/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<0.8.0,>=0.7.8
              Using cached https://pypi.tuna.tsinghua.edu.cn/packages/51/8c/60c85350f2e1c9647df580083a0f6acc686ef32d1a91f4ab0c624b3ff867/blis-0.7.11.tar.gz (2.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 'error'
              error: subprocess-exited-with-error

              × Getting requirements to build wheel did not run successfully.
              │ exit code: 1
              ╰─> [62 lines of output]
                  Traceback (most recent call last):
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-4lu4dlu3/overlay/lib/python3.9/site-packages/numpy/_core/__init__.py", line 23, in <module>
                      from . import multiarray
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-4lu4dlu3/overlay/lib/python3.9/site-packages/numpy/_core/multiarray.py", line 10, in <module>
                      from . import overrides
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-4lu4dlu3/overlay/lib/python3.9/site-packages/numpy/_core/overrides.py", line 8, in <module>
                      from numpy._core._multiarray_umath import (
                  ImportError: dlopen failed: cannot locate symbol "PyExc_ValueError" referenced by "/data/data/com.termux/files/usr/tmp/pip-build-env-4lu4dlu3/overlay/lib/python3.9/site-packages/numpy/_core/_multiarray_umath.cpython-39.so"...

                  During handling of the above exception, another exception occurred:

                  Traceback (most recent call last):
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-4lu4dlu3/overlay/lib/python3.9/site-packages/numpy/__init__.py", line 114, in <module>
                      from numpy.__config__ import show as show_config
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-4lu4dlu3/overlay/lib/python3.9/site-packages/numpy/__config__.py", line 4, in <module>
                      from numpy._core._multiarray_umath import (
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-4lu4dlu3/overlay/lib/python3.9/site-packages/numpy/_core/__init__.py", line 49, in <module>
                      raise ImportError(msg)
                  ImportError:

                  IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

                  Importing the numpy C-extensions failed. This error can happen for
                  many reasons, often due to issues with your setup or how NumPy was
                  installed.

                  We have compiled some common reasons and troubleshooting tips at:

                      https://numpy.org/devdocs/user/troubleshooting-importerror.html

                  Please note and check the following:

                    * The Python version is: Python3.9 from "/data/data/com.termux/files/usr/bin/python"
                    * The NumPy version is: "2.0.1"

                  and make sure that they are the versions you expect.
                  Please carefully study the documentation linked above for further help.

                  Original error was: dlopen failed: cannot locate symbol "PyExc_ValueError" referenced by "/data/data/com.termux/files/usr/tmp/pip-build-env-4lu4dlu3/overlay/lib/python3.9/site-packages/numpy/_core/_multiarray_umath.cpython-39.so"...

                  The above exception was the direct cause of the following exception:

                  Traceback (most recent call last):
                    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
                      main()
                    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
                      json_out['return_val'] = hook(**hook_input['kwargs'])
                    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
                      return hook(config_settings)
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-4lu4dlu3/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
                      return self._get_build_requires(config_settings, requirements=[])
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-4lu4dlu3/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
                      self.run_setup()
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-4lu4dlu3/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 313, in run_setup
                      exec(code, locals())
                    File "<string>", line 23, in <module>
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-4lu4dlu3/overlay/lib/python3.9/site-packages/numpy/__init__.py", line 119, in <module>
                      raise ImportError(msg) from e
                  ImportError: Error importing numpy: you should not try to import numpy from
                          its source directory; please exit the numpy source tree, and relaunch
                          your python interpreter from there.
                  [end of output]

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

            × Getting requirements to build wheel 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.
      [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.

Be ineffective

无效果

But Thanks

但还是谢谢你

licy183 commented 3 months ago

How did you install numpy? It seems that there is something with it. Try MATHLIB=m LDFLAGS="-lpython3.9" pip install --force-reinstall numpy.

你这个 numpy 从哪装的,感觉 numpy 装的有问题啊。试试重新装一下 numpy。MATHLIB=m LDFLAGS="-lpython3.9" pip install --force-reinstall numpy

YanXuHaa commented 3 months ago

How did you install numpy? It seems that there is something with it. Try MATHLIB=m LDFLAGS="-lpython3.9" pip install --force-reinstall numpy.

你这个 numpy 从哪装的,感觉 numpy 装的有问题啊。试试重新装一下 numpy。MATHLIB=m LDFLAGS="-lpython3.9" pip install --force-reinstall numpy


~ $ pip uninstall numpy
Found existing installation: numpy 2.0.1
Uninstalling numpy-2.0.1:
  Would remove:
    /data/data/com.termux/files/usr/bin/f2py
    /data/data/com.termux/files/usr/bin/numpy-config
    /data/data/com.termux/files/usr/lib/python3.9/site-packages/numpy-2.0.1.dist-info/*
    /data/data/com.termux/files/usr/lib/python3.9/site-packages/numpy/*
Proceed (Y/n)? y
  Successfully uninstalled numpy-2.0.1
~ $ MATHLIB=m LDFLAGS="-lpython3.9" pip install --force-reinstall numpy
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting numpy
  Using cached numpy-2.0.1-cp39-cp39-linux_aarch64.whl
Installing collected packages: numpy
Successfully installed numpy-2.0.1
~ $ LDFLAGS="-lpython3.9" pip install spacy
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting spacy
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/21/1e/94e3981516db6fcd6685f058c43c3fa81805c120b04829596367dad1aa4e/spacy-3.7.5.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
  ╰─> [138 lines of output]
      Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
      Ignoring numpy: markers 'python_version < "3.9"' don't match your environment
      Collecting setuptools
        Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e1/58/e0ef3b9974a04ce9cde2a7a33881ddcb2d68450803745804545cdd8d258f/setuptools-72.1.0-py3-none-any.whl (2.3 MB)
      Collecting cython<3.0,>=0.25
        Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7e/26/9d8de10005fedb1eceabe713348d43bae1dbab1786042ca0751a2e2b0f8c/Cython-0.29.37-py2.py3-none-any.whl (989 kB)
      Collecting cymem<2.1.0,>=2.0.2
        Using cached cymem-2.0.8-cp39-cp39-linux_aarch64.whl
      Collecting preshed<3.1.0,>=3.0.2
        Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f2/4e/76dbf784e7d4ed069f91a4c249b1d6ec6856ef0c0b2fd96992895d458b15/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.10-cp39-cp39-linux_aarch64.whl
      Collecting thinc<8.3.0,>=8.2.2
        Using cached https://pypi.tuna.tsinghua.edu.cn/packages/3b/2a/0e2e961e6152bedecca70e6833f6e827ee621efcee7496643242b506d54f/thinc-8.2.5.tar.gz (193 kB)
        Installing build dependencies: started
        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
        ╰─> [101 lines of output]
            Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
            Ignoring numpy: markers 'python_version < "3.9"' don't match your environment
            Collecting setuptools
              Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e1/58/e0ef3b9974a04ce9cde2a7a33881ddcb2d68450803745804545cdd8d258f/setuptools-72.1.0-py3-none-any.whl (2.3 MB)
            Collecting cython<3.0,>=0.25
              Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7e/26/9d8de10005fedb1eceabe713348d43bae1dbab1786042ca0751a2e2b0f8c/Cython-0.29.37-py2.py3-none-any.whl (989 kB)
            Collecting murmurhash<1.1.0,>=1.0.2
              Using cached murmurhash-1.0.10-cp39-cp39-linux_aarch64.whl
            Collecting cymem<2.1.0,>=2.0.2
              Using cached cymem-2.0.8-cp39-cp39-linux_aarch64.whl
            Collecting preshed<3.1.0,>=3.0.2
              Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f2/4e/76dbf784e7d4ed069f91a4c249b1d6ec6856ef0c0b2fd96992895d458b15/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<0.8.0,>=0.7.8
              Using cached https://pypi.tuna.tsinghua.edu.cn/packages/51/8c/60c85350f2e1c9647df580083a0f6acc686ef32d1a91f4ab0c624b3ff867/blis-0.7.11.tar.gz (2.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 'error'
              error: subprocess-exited-with-error

              × Getting requirements to build wheel did not run successfully.
              │ exit code: 1
              ╰─> [62 lines of output]
                  Traceback (most recent call last):
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-v_7o5z3v/overlay/lib/python3.9/site-packages/numpy/_core/__init__.py", line 23, in <module>
                      from . import multiarray
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-v_7o5z3v/overlay/lib/python3.9/site-packages/numpy/_core/multiarray.py", line 10, in <module>
                      from . import overrides
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-v_7o5z3v/overlay/lib/python3.9/site-packages/numpy/_core/overrides.py", line 8, in <module>
                      from numpy._core._multiarray_umath import (
                  ImportError: dlopen failed: cannot locate symbol "PyExc_ValueError" referenced by "/data/data/com.termux/files/usr/tmp/pip-build-env-v_7o5z3v/overlay/lib/python3.9/site-packages/numpy/_core/_multiarray_umath.cpython-39.so"...

                  During handling of the above exception, another exception occurred:

                  Traceback (most recent call last):
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-v_7o5z3v/overlay/lib/python3.9/site-packages/numpy/__init__.py", line 114, in <module>
                      from numpy.__config__ import show as show_config
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-v_7o5z3v/overlay/lib/python3.9/site-packages/numpy/__config__.py", line 4, in <module>
                      from numpy._core._multiarray_umath import (
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-v_7o5z3v/overlay/lib/python3.9/site-packages/numpy/_core/__init__.py", line 49, in <module>
                      raise ImportError(msg)
                  ImportError:

                  IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

                  Importing the numpy C-extensions failed. This error can happen for
                  many reasons, often due to issues with your setup or how NumPy was
                  installed.

                  We have compiled some common reasons and troubleshooting tips at:

                      https://numpy.org/devdocs/user/troubleshooting-importerror.html

                  Please note and check the following:

                    * The Python version is: Python3.9 from "/data/data/com.termux/files/usr/bin/python"
                    * The NumPy version is: "2.0.1"

                  and make sure that they are the versions you expect.
                  Please carefully study the documentation linked above for further help.

                  Original error was: dlopen failed: cannot locate symbol "PyExc_ValueError" referenced by "/data/data/com.termux/files/usr/tmp/pip-build-env-v_7o5z3v/overlay/lib/python3.9/site-packages/numpy/_core/_multiarray_umath.cpython-39.so"...

                  The above exception was the direct cause of the following exception:

                  Traceback (most recent call last):
                    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
                      main()
                    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
                      json_out['return_val'] = hook(**hook_input['kwargs'])
                    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
                      return hook(config_settings)
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-v_7o5z3v/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
                      return self._get_build_requires(config_settings, requirements=[])
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-v_7o5z3v/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
                      self.run_setup()
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-v_7o5z3v/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 313, in run_setup
                      exec(code, locals())
                    File "<string>", line 23, in <module>
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-v_7o5z3v/overlay/lib/python3.9/site-packages/numpy/__init__.py", line 119, in <module>
                      raise ImportError(msg) from e
                  ImportError: Error importing numpy: you should not try to import numpy from
                          its source directory; please exit the numpy source tree, and relaunch
                          your python interpreter from there.
                  [end of output]

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

            × Getting requirements to build wheel 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.
      [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.

卸载后用你发的重装后仍不行 哭(T_T)

Be ineffective

licy183 commented 3 months ago

Emmm... It uses the prebuilt cache. pip install --no-cache-dir --force-reinstall numpy

草,用了 cache,禁用一下 cache. pip install --no-cache-dir --force-reinstall numpy

YanXuHaa commented 3 months ago

Emmm... It uses the prebuilt cache. pip install --no-cache-dir --force-reinstall numpy

草,用了 cache,禁用一下 cache. pip install --no-cache-dir --force-reinstall numpy


LDFLAGS="-lpython3.9" pip install spacy
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting spacy
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/21/1e/94e3981516db6fcd6685f058c43c3fa81805c120b04829596367dad1aa4e/spacy-3.7.5.tar.gz (1.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 1.7 MB/s eta 0:00:00
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [211 lines of output]
      Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
      Ignoring numpy: markers 'python_version < "3.9"' don't match your environment
      Collecting setuptools
        Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e1/58/e0ef3b9974a04ce9cde2a7a33881ddcb2d68450803745804545cdd8d258f/setuptools-72.1.0-py3-none-any.whl (2.3 MB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 MB 1.5 MB/s eta 0:00:00
      Collecting cython<3.0,>=0.25
        Downloading https://pypi.tuna.tsinghua.edu.cn/packages/7e/26/9d8de10005fedb1eceabe713348d43bae1dbab1786042ca0751a2e2b0f8c/Cython-0.29.37-py2.py3-none-any.whl (989 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 989.5/989.5 kB 1.9 MB/s eta 0:00:00
      Collecting cymem<2.1.0,>=2.0.2
        Downloading https://pypi.tuna.tsinghua.edu.cn/packages/36/32/f4a457fc6c160a9e72b15dab1ca14ca5c8869074638bca8bfc26120c04e9/cymem-2.0.8.tar.gz (9.8 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 preshed<3.1.0,>=3.0.2
        Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f2/4e/76dbf784e7d4ed069f91a4c249b1d6ec6856ef0c0b2fd96992895d458b15/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.10-cp39-cp39-linux_aarch64.whl
      Collecting thinc<8.3.0,>=8.2.2
        Downloading https://pypi.tuna.tsinghua.edu.cn/packages/3b/2a/0e2e961e6152bedecca70e6833f6e827ee621efcee7496643242b506d54f/thinc-8.2.5.tar.gz (193 kB)
        Installing build dependencies: started
        Installing build dependencies: still running...
        Installing build dependencies: still running...
        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
        ╰─> [163 lines of output]
            Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
            Ignoring numpy: markers 'python_version < "3.9"' don't match your environment
            Collecting setuptools
              Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e1/58/e0ef3b9974a04ce9cde2a7a33881ddcb2d68450803745804545cdd8d258f/setuptools-72.1.0-py3-none-any.whl (2.3 MB)
            Collecting cython<3.0,>=0.25
              Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7e/26/9d8de10005fedb1eceabe713348d43bae1dbab1786042ca0751a2e2b0f8c/Cython-0.29.37-py2.py3-none-any.whl (989 kB)
            Collecting murmurhash<1.1.0,>=1.0.2
              Using cached murmurhash-1.0.10-cp39-cp39-linux_aarch64.whl
            Collecting cymem<2.1.0,>=2.0.2
              Using cached cymem-2.0.8-cp39-cp39-linux_aarch64.whl
            Collecting preshed<3.1.0,>=3.0.2
              Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f2/4e/76dbf784e7d4ed069f91a4c249b1d6ec6856ef0c0b2fd96992895d458b15/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<0.8.0,>=0.7.8
              Downloading https://pypi.tuna.tsinghua.edu.cn/packages/51/8c/60c85350f2e1c9647df580083a0f6acc686ef32d1a91f4ab0c624b3ff867/blis-0.7.11.tar.gz (2.9 MB)
                 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.9/2.9 MB 674.0 kB/s eta 0:00:00
              Installing build dependencies: started
              Installing build dependencies: still running...
              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.0.0,>=1.25.0
              Downloading https://pypi.tuna.tsinghua.edu.cn/packages/65/6e/09db70a523a96d25e115e71cc56a6f9031e7b8cd166c1ac8438307c14058/numpy-1.26.4.tar.gz (15.8 MB)
                 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.8/15.8 MB 810.6 kB/s eta 0:00:00
              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): still running...
              Preparing metadata (pyproject.toml): finished with status 'done'
            Building wheels for collected packages: preshed, blis, numpy
              Building wheel for preshed (pyproject.toml): started
              Building wheel for preshed (pyproject.toml): finished with status 'done'
              Created wheel for preshed: filename=preshed-3.0.9-cp39-cp39-linux_aarch64.whl size=458569 sha256=7fa3f987c5f63092765585247387581a55094c21a0b7c1cd9f3d6808a37dbf2e
              Stored in directory: /data/data/com.termux/files/home/.cache/pip/wheels/f8/14/d9/96128410bb7760350f87f31490b4e14fd4438c3ab9aada4a31
              Building wheel for blis (pyproject.toml): started
              Building wheel for blis (pyproject.toml): finished with status 'error'
              error: subprocess-exited-with-error

              × Building wheel for blis (pyproject.toml) did not run successfully.
              │ exit code: 1
              ╰─> [102 lines of output]
                  BLIS_COMPILER? None
                  running bdist_wheel
                  running build
                  running build_py
                  creating build
                  creating build/lib.linux-aarch64-cpython-39
                  creating build/lib.linux-aarch64-cpython-39/blis
                  copying blis/__init__.py -> build/lib.linux-aarch64-cpython-39/blis
                  copying blis/about.py -> build/lib.linux-aarch64-cpython-39/blis
                  copying blis/benchmark.py -> build/lib.linux-aarch64-cpython-39/blis
                  creating build/lib.linux-aarch64-cpython-39/blis/tests
                  copying blis/tests/__init__.py -> build/lib.linux-aarch64-cpython-39/blis/tests
                  copying blis/tests/common.py -> build/lib.linux-aarch64-cpython-39/blis/tests
                  copying blis/tests/test_dotv.py -> build/lib.linux-aarch64-cpython-39/blis/tests
                  copying blis/tests/test_gemm.py -> build/lib.linux-aarch64-cpython-39/blis/tests
                  copying blis/cy.pyx -> build/lib.linux-aarch64-cpython-39/blis
                  copying blis/py.pyx -> build/lib.linux-aarch64-cpython-39/blis
                  copying blis/__init__.pxd -> build/lib.linux-aarch64-cpython-39/blis
                  copying blis/cy.pxd -> build/lib.linux-aarch64-cpython-39/blis
                  running build_ext
                  /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:78:1: error: inline assembly requires more registers than available
                     78 | "                                            \n\t"
                        | ^
                  /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:78:1: error: inline assembly requires more registers than available
                  /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:78:1: error: inline assembly requires more registers than available
                  /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:78:1: error: inline assembly requires more registers than available
                  /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:78:1: error: inline assembly requires more registers than available
                  /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:78:1: error: inline assembly requires more registers than available
                  /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:78:1: error: inline assembly requires more registers than available
                  /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:78:1: error: inline assembly requires more registers than available
                  /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:1132:1: error: inline assembly requires more registers than available
                   1132 | "                                            \n\t"
                        | ^
                  /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:1132:1: error: inline assembly requires more registers than available
                  /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:1132:1: error: inline assembly requires more registers than available
                  /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:1132:1: error: inline assembly requires more registers than available
                  /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:1132:1: error: inline assembly requires more registers than available
                  /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:1132:1: error: inline assembly requires more registers than available
                  /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:78:1: warning: inline asm clobber list contains reserved registers: X18 [-Winline-asm]
                     78 | "                                            \n\t"
                        | ^
                  /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:78:1: note: Reserved registers on the clobber list may not be preserved across the asm statement, and clobbering them may lead to undefined behaviour.
                  1 warning and 14 errors generated.
                  Build options linux unix
                  BUILD ARCH: cortexa57
                  {'SHELL': '/bin/bash', 'TRAVIS_OSX_IMAGE': '', 'TRAVIS_JOB_WEB_URL': 'https://travis-ci.org/explosion/cython-blis/jobs/718174465', 'TRAVIS_REPO_SLUG': 'explosion/cython-blis', 'SUDO_GID': '0', 'TRAVIS_APT_PROXY': 'http://build-cache.travisci.net', 'ANSI_RED': '\\033[31;1m', 'rvm_prefix': '/home/travis', 'TRAVIS_CMD': 'if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./bin/generate-make-jsonl linux $BLIS_ARCH --export; fi', 'ANSI_CLEAR': '\\033[0K', 'TRAVIS_BUILD_ID': '718174460', 'TRAVIS_LANGUAGE': 'python', 'TRAVIS_TEST_RESULT': '', 'TRAVIS_TIMER_START_TIME': '1597496339808703115', 'APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE': '1', 'MY_RUBY_HOME': '/home/travis/.rvm/rubies/ruby-2.7.0', 'SUDO_COMMAND': '/usr/bin/bash /home/travis/build.sh', 'MYSQL_UNIX_PORT': '/var/run/mysqld/mysqld.sock', 'SUDO_USER': 'root', 'PERLBREW_HOME': '/home/travis/.perlbrew', 'TRAVIS_PULL_REQUEST_BRANCH': '', 'CONTINUOUS_INTEGRATION': 'true', 'RUBY_VERSION': 'ruby-2.7.0', 'PERLBREW_SHELLRC_VERSION': '0.88', 'PWD': '/home/travis/build/explosion/cython-blis/flame-blis', 'ANSI_RESET': '\\033[0m', 'LOGNAME': 'travis', 'TRAVIS_INTERNAL_RUBY_REGEX': '^ruby-(2\\.[0-4]\\.[0-9]|1\\.9\\.3)', 'TRAVIS_INFRA': 'unknown', 'TRAVIS_BUILD_NUMBER': '624', 'rvm_version': '1.29.10 (latest)', 'MANPATH': '/home/travis/.nvm/versions/node/v8.12.0/share/man:/home/travis/.kiex/elixirs/elixir-1.9.1/man:/usr/local/man:/usr/local/share/man:/usr/share/man', 'TRAVIS_EVENT_TYPE': 'api', 'TRAVIS_ARCH': 'aarch64', 'ANSI_YELLOW': '\\033[33;1m', 'container': 'lxc', 'PIP_PROGRESS_BAR': 'off', 'HOME': '/home/travis', 'TRAVIS_DIST': 'focal', 'LANG': 'C.UTF-8', 'TRAVIS_OS_NAME': 'linux', 'VIRTUAL_ENV': '/home/travis/virtualenv/python3.7.8', 'TRAVIS_ENABLE_INFRA_DETECTION': 'true', 'GIT_ASKPASS': 'echo', 'TRAVIS_TAG': '', 'TRAVIS_FILTERED': 'redirect_io', 'TRAVIS_COMMIT': 'cef3ec4fc5486458ddd6cd117513985ce3ad13f9', 'TRAVIS_TMPDIR': '/tmp/tmp.IwNDIYQhsz', 'PLAT': 'x86_64', 'TRAVIS_HOME': '/home/travis', 'TRAVIS_BRANCH': 'master', 'TRAVIS_SUDO': 'true', 'TRAVIS_BUILD_DIR': '/home/travis/build/explosion/cython-blis', 'TRAVIS_PYTHON_VERSION': '3.7', 'NVM_DIR': '/home/travis/.nvm', 'rvm_bin_path': '/home/travis/.rvm/bin', 'GEM_PATH': '/home/travis/.rvm/gems/ruby-2.7.0:/home/travis/.rvm/gems/ruby-2.7.0@global', 'GEM_HOME': '/home/travis/.rvm/gems/ruby-2.7.0', 'TRAVIS_SECURE_ENV_VARS': 'false', 'TRAVIS_TIMER_ID': '163ea0c0', 'TERM': 'xterm', 'UNICODE_WIDTH': '32', 'USER': 'travis', 'PIP_DISABLE_PIP_VERSION_CHECK': '1', 'TRAVIS_JOB_ID': '718174465', 'TRAVIS_CPU_ARCH': 'arm64', 'TRAVIS_PULL_REQUEST_SLUG': '', 'SHLVL': '1', 'NVM_CD_FLAGS': '', 'PAGER': 'cat', 'BLIS_ARCH': 'cortexa57', 'TRAVIS_JOB_NUMBER': '624.5', 'TRAVIS_ROOT': '/', 'TRAVIS_COMMIT_MESSAGE': "Don't try to export wheel from travis", 'TRAVIS_ALLOW_FAILURE': '', 'TRAVIS_APP_HOST': 'build.travis-ci.org', 'PS4': '+', 'ANSI_GREEN': '\\033[32;1m', 'TRAVIS_PULL_REQUEST_SHA': '', 'ELIXIR_VERSION': '1.9.1', 'TRAVIS_BUILD_STAGE_NAME': '', 'XDG_DATA_DIRS': '/usr/local/share:/usr/share:/var/lib/snapd/desktop', 'TRAVIS_PULL_REQUEST': 'false', 'TRAVIS_COMMIT_RANGE': '9ea1f52ce0327c4734cfddc5c06ffe6b43a3b3dc...cef3ec4fc5486458ddd6cd117513985ce3ad13f9', 'PATH': '/home/travis/virtualenv/python3.7.8/bin:/home/travis/bin:/home/travis/.local/bin:/home/travis/.rvm/gems/ruby-2.7.0/bin:/home/travis/.rvm/gems/ruby-2.7.0@global/bin:/home/travis/.rvm/rubies/ruby-2.7.0/bin:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.kiex/elixirs/elixir-1.9.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/travis/.phpenv/bin:/home/travis/.rvm/bin', 'TRAVIS_INIT': 'systemd', 'CC': 'gcc', 'CI': 'true', 'SUDO_UID': '0', 'PERLBREW_ROOT': '/home/travis/perl5/perlbrew', 'NVM_BIN': '/home/travis/.nvm/versions/node/v8.12.0/bin', 'TRAVIS': 'true', 'MIX_ARCHIVES': '/home/travis/.kiex/mix/elixir-1.9.1', 'IRBRC': '/home/travis/.rvm/rubies/ruby-2.7.0/.irbrc', 'TRAVIS_BUILD_WEB_URL': 'https://travis-ci.org/explosion/cython-blis/builds/718174460', 'DEBIAN_FRONTEND': 'noninteractive', 'TRAVIS_JOB_NAME': '', 'rvm_path': '/home/travis/.rvm', 'OLDPWD': '/home/travis/build/explosion/cython-blis', 'HAS_JOSH_K_SEAL_OF_APPROVAL': 'true', '_': '/home/travis/virtualenv/python3.7.8/bin/python'}
                  [COMMAND] gcc -c /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/config/cortexa57/bli_cntx_init_cortexa57.c -o /data/data/com.termux/files/usr/tmp/tmpbxrqfali/bli_cntx_init_cortexa57.o -O3 -ftree-vectorize -mtune=cortex-a57 -fPIC -std=c99 -D_GNU_SOURCE -D_POSIX_C_SOURCE=200112L -DBLIS_VERSION_STRING="0.7.0" -DBLIS_IS_BUILDING_LIBRARY -Iinclude/linux-cortexa57 -I./frame/3/ -I./frame/ind/ukernels/ -I./frame/3/ -I./frame/1m/ -I./frame/1f/ -I./frame/1/ -I./frame/include -I/data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/include/linux-cortexa57
                  [COMMAND] gcc -c /data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c -o /data/data/com.termux/files/usr/tmp/tmpbxrqfali/bli_gemm_armv8a_asm_d6x8.o -O3 -ftree-vectorize -mtune=cortex-a57 -march=armv8-a+fp+simd -mcpu=cortex-a57 -fPIC -std=c99 -D_GNU_SOURCE -D_POSIX_C_SOURCE=200112L -DBLIS_VERSION_STRING="0.7.0" -DBLIS_IS_BUILDING_LIBRARY -Iinclude/linux-cortexa57 -I./frame/3/ -I./frame/ind/ukernels/ -I./frame/3/ -I./frame/1m/ -I./frame/1f/ -I./frame/1/ -I./frame/include -I/data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/include/linux-cortexa57
                  Traceback (most recent call last):
                    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
                      main()
                    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
                      json_out['return_val'] = hook(**hook_input['kwargs'])
                    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
                      return _build_backend().build_wheel(wheel_directory, config_settings,
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 415, in build_wheel
                      return self._build_with_temp_dir(
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
                      self.run_setup()
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 313, in run_setup
                      exec(code, locals())
                    File "<string>", line 296, in <module>
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 108, in setup
                      return distutils.core.setup(**attrs)
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 184, in setup
                      return run_commands(dist)
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
                      dist.run_commands()
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands
                      self.run_command(cmd)
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 945, in run_command
                      super().run_command(command)
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
                      cmd_obj.run()
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/command/bdist_wheel.py", line 373, in run
                      self.run_command("build")
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
                      self.distribution.run_command(command)
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 945, in run_command
                      super().run_command(command)
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
                      cmd_obj.run()
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
                      self.run_command(cmd_name)
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
                      self.distribution.run_command(command)
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 945, in run_command
                      super().run_command(command)
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
                      cmd_obj.run()
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 93, in run
                      _build_ext.run(self)
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
                      _build_ext.build_ext.run(self)
                    File "/data/data/com.termux/files/usr/tmp/pip-build-env-nbc2wd18/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
                      self.build_extensions()
                    File "<string>", line 104, in build_extensions
                    File "<string>", line 232, in compile_objects
                    File "<string>", line 247, in build_object
                    File "/data/data/com.termux/files/usr/lib/python3.9/subprocess.py", line 373, in check_call
                      raise CalledProcessError(retcode, cmd)
                  subprocess.CalledProcessError: Command '['gcc', '-c', '/data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c', '-o', '/data/data/com.termux/files/usr/tmp/tmpbxrqfali/bli_gemm_armv8a_asm_d6x8.o', '-O3', '-ftree-vectorize', '-mtune=cortex-a57', '-march=armv8-a+fp+simd', '-mcpu=cortex-a57', '-fPIC', '-std=c99', '-D_GNU_SOURCE', '-D_POSIX_C_SOURCE=200112L', '-DBLIS_VERSION_STRING="0.7.0"', '-DBLIS_IS_BUILDING_LIBRARY', '-Iinclude/linux-cortexa57', '-I./frame/3/', '-I./frame/ind/ukernels/', '-I./frame/3/', '-I./frame/1m/', '-I./frame/1f/', '-I./frame/1/', '-I./frame/include', '-I/data/data/com.termux/files/usr/tmp/pip-install-1f055kn6/blis_5a5da28f1c2d477fb4359f655f1bb009/blis/_src/include/linux-cortexa57']' returned non-zero exit status 1.
                  [end of output]

              note: This error originates from a subprocess, and is likely not a problem with pip.
              ERROR: Failed building wheel for blis
              Building wheel for numpy (pyproject.toml): started
              Building wheel for numpy (pyproject.toml): finished with status 'done'
              Created wheel for numpy: filename=numpy-1.26.4-cp39-cp39-linux_aarch64.whl size=5294854 sha256=b20c8b26ccd465e0ef72df29eaa6a4c5906d5c614cd44446879ce1e58e2918a3
              Stored in directory: /data/data/com.termux/files/home/.cache/pip/wheels/b5/34/0c/f1d4f5f0c282d7e87729f2d82108bcb3cf10b43b864be5f5a1
            Successfully built preshed numpy
            Failed to build blis
            ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (blis)
            [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.
~ $

Failed to build blis这玩意好像再加个玩意就行了吧不太确定

之前看其它issue好像有关于bils的问题但我刚才没找到

YanXuHaa commented 3 months ago

ahh


~ $ BLIS_ARCH="generic" LDFLAGS="-lpython3.9" pip install spacy
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting spacy
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/21/1e/94e3981516db6fcd6685f058c43c3fa81805c120b04829596367dad1aa4e/spacy-3.7.5.tar.gz (1.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 1.5 MB/s eta 0:00:00
  Installing build dependencies ... /

AHHHH---- it spend me two hours on this

and it can't correct work......

YanXuHaa commented 3 months ago

Thanks to everyone for their help My problem was solved

To sum

I posted an issue for the first time I feel the friendliness of the community

I also found the problem with my installation The reason is that when I installed numpy Used MATHLIB=m LDFLAGS="-lpython3.11" Causes a mismatch with my version of python Uninstall Reinstall and Use MATHLIB=m LDFLAGS="-lpython3.9" pip install --force-reinstall numpy But have a problem. So i used pip cache purge After clearing cache Reused↓ MATHLIB=m LDFLAGS="-lpython3.9" pip install --force-reinstall numpy Then Install spacy, get a hint “Failed to build blis”

In other issue, there are similar errors, so when I find that, I use that BLIS_ARCH="generic" LDFLAGS="-lpython3.9" pip install spacy Added "BLIS_ARCH =" generic "" Then, after waiting for about two hours, I successfully installed spacy

So, my problem was solved I will close

Maybe an issue about chatterbot will be sent later ha-ha

in the end Thanks!