错误:无法为 coincurve 构建轮子,这是安装基于 pyproject.toml 的项目所必需的

Fro*_*tWy 5 python android bit termux samsung

在未 root 的 Samsung Galaxy s10 Android 12 上使用 Termux 安装位时出错

\n
~ $ pip3 install bit                                    Collecting bit\n  Using cached bit-0.8.0-py3-none-any.whl (68 kB)\nCollecting requests                                       Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)                                                     Collecting coincurve>=4.3.0\n  Using cached coincurve-17.0.0.tar.gz (2.5 MB)\n  Installing build dependencies ... done\n  Getting requirements to build wheel ... done            Installing backend dependencies ... done\n  Preparing metadata (pyproject.toml) ... done\nCollecting asn1crypto\n  Using cached asn1crypto-1.5.0-py2.py3-none-any.whl (105 kB)                                                   Collecting cffi>=1.3.0\n  Using cached cffi-1.15.0-cp310-cp310-linux_aarch64.whlCollecting urllib3<1.27,>=1.21.1                          Using cached urllib3-1.26.8-py2.py3-none-any.whl (138 kB)\nCollecting certifi>=2017.4.17\n  Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)\nCollecting charset-normalizer~=2.0.0\n  Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)\nCollecting idna<4,>=2.5\n  Using cached idna-3.3-py3-none-any.whl (61 kB)\nCollecting pycparser\n  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)\nBuilding wheels for collected packages: coincurve\n  Building wheel for coincurve (pyproject.toml) ... error\n  error: subprocess-exited-with-error\n\n  \xc3\x97 Building wheel for coincurve (pyproject.toml) did not run successfully.\n  \xe2\x94\x82 exit code: 1\n  \xe2\x95\xb0\xe2\x94\x80> [64 lines of output]\n      running bdist_wheel\n      running build\n      running build_py\n      creating build\n      creating build/lib.linux-aarch64-3.10\n      creating build/lib.linux-aarch64-3.10/coincurve\n      copying coincurve/types.py -> build/lib.linux-aarch64-3.10/coincurve\n      copying coincurve/ecdsa.py -> build/lib.linux-aarch64-3.10/coincurve\n      copying coincurve/_windows_libsecp256k1.py -> build/lib.linux-aarch64-3.10/coincurve\n      copying coincurve/keys.py -> build/lib.linux-aarch64-3.10/coincurve\n      copying coincurve/context.py -> build/lib.linux-aarch64-3.10/coincurve\n      copying coincurve/flags.py -> build/lib.linux-aarch64-3.10/coincurve\n      copying coincurve/__init__.py -> build/lib.linux-aarch64-3.10/coincurve\n      copying coincurve/utils.py -> build/lib.linux-aarch64-3.10/coincurve\n      copying coincurve/py.typed -> build/lib.linux-aarch64-3.10/coincurve\n      running build_clib\n      Can't exec "aclocal": No such file or directory at /data/data/com.termux/files/usr/share/autoconf/Autom4te/FileUtils.pm line 274.\n      autoreconf: error: aclocal failed with exit status: 1\n      Traceback (most recent call last):\n        File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>\n          main()\n        File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main\n          json_out['return_val'] = hook(**hook_input['kwargs'])\n        File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel\n          return _build_backend().build_wheel(wheel_directory, config_settings,\n        File "/data/data/com.termux/files/usr/tmp/pip-build-env-idl32cqz/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 244, in build_wheel\n          return self._build_with_temp_dir(['bdist_wheel'], '.whl',\n        File "/data/data/com.termux/files/usr/tmp/pip-build-env-idl32cqz/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 229, in _build_with_temp_dir\n          self.run_setup()\n        File "/data/data/com.termux/files/usr/tmp/pip-build-env-idl32cqz/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 281, in run_setup\n          super(_BuildMetaLegacyBackend,\n        File "/data/data/com.termux/files/usr/tmp/pip-build-env-idl32cqz/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 174, in run_setup\n          exec(compile(code, __file__, 'exec'), locals())\n        File "setup.py", line 264, in <module>\n          setup(\n        File "/data/data/com.termux/files/usr/tmp/pip-build-env-idl32cqz/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 155, in setup\n          return distutils.core.setup(**attrs)\n        File "/data/data/com.termux/files/usr/tmp/pip-build-env-idl32cqz/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup\n          return run_commands(dist)\n        File "/data/data/com.termux/files/usr/tmp/pip-build-env-idl32cqz/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 163, in run_commands\n          dist.run_commands()\n        File "/data/data/com.termux/files/usr/tmp/pip-build-env-idl32cqz/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands\n          self.run_command(cmd)\n        File "/data/data/com.termux/files/usr/tmp/pip-build-env-idl32cqz/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command\n          cmd_obj.run()\n        File "setup.py", line 97, in run\n          _bdist_wheel.run(self)\n        File "/data/data/com.termux/files/usr/tmp/pip-build-env-idl32cqz/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 299, in run\n          self.run_command('build')\n        File "/data/data/com.termux/files/usr/tmp/pip-build-env-idl32cqz/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command\n          self.distribution.run_command(command)\n        File "/data/data/com.termux/files/usr/tmp/pip-build-env-idl32cqz/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command\n          cmd_obj.run()\n        File "/data/data/com.termux/files/usr/tmp/pip-build-env-idl32cqz/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135, in run\n          self.run_command(cmd_name)\n        File "/data/data/com.termux/files/usr/tmp/pip-build-env-idl32cqz/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command\n          self.distribution.run_command(command)\n        File "/data/data/com.termux/files/usr/tmp/pip-build-env-idl32cqz/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command\n          cmd_obj.run()\n        File "setup.py", line 154, in run\n          subprocess.check_call([autogen], cwd=absolute('libsecp256k1'))\n        File "/data/data/com.termux/files/usr/lib/python3.10/subprocess.py", line 369, in check_call\n          raise CalledProcessError(retcode, cmd)\n      subprocess.CalledProcessError: Command '['/data/data/com.termux/files/usr/tmp/pip-install-pgwmnz6f/coincurve_5ace6eabc71247daaa71de70d4272038/libsecp256k1/autogen.sh']' returned non-zero exit status 1.\n      [end of output]\n\n  note: This error originates from a subprocess, and is likely not a problem with pip.\n  ERROR: Failed building wheel for coincurve\nFailed to build coincurve\nERROR: Could not build wheels for coincurve, which is required to install pyproject.toml-based projects\n
Run Code Online (Sandbox Code Playgroud)\n

我已经安装了wheel,但它仍然无法工作,并尝试了其他一些东西,但都没有工作(抱歉,我不记得了)。\n我正在使用Python 3.10.2和pip 22.0.4\n一切通常都是最新的

\n

有人知道我该如何解决这个问题吗?

\n

小智 1

更新 pip3 并安装wheel。然后尝试单独安装 coincurve。

pip3 install --upgrade pip3

pip3 install wheel

pip3 install coincurve
Run Code Online (Sandbox Code Playgroud)