qiskit-metapackage
qiskit-metapackage copied to clipboard
failed to install qiskit on android device using termux
pip install qiskit
command on android termux attempts to build the dependencies viz., cmake
and ninja
.
Unable to get cmake dependency worked out for this and hence qiskit is not installing.
Kindly consider collaborative ways to fix this, would be much appreciated.
Informations
- Qiskit version: 0.37.1
- Python version: Python 3.10.6
- Operating system: Xiaomi Redmi Note 7 Pro running Android 9 (aarch64)
What is the current behaviour?
pip install qiskit
fails with error `pip subprocess to install build dependencies did not run successfully
Steps to reproduce the problem
- Open termux and command
pip install qiskit
- command fails with error
pip subprocess to install build dependencies did not run successfully
What is the expected behaviour?
After running pip install qiskit
the qiskit package should be installed in termux python.
Suggested solutions
Error Log (relevant partial log):
[ 38%] Building C object Utilities/cmliblzma/CMakeFiles/cmliblzma.dir/liblzma/simple/x86.c.o
[ 38%] Linking C static library libcmliblzma.a [ 38%] Built target cmliblzma
[ 38%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_acl.c.o
In file included from /data/data/com.termux/files/usr/tmp/pip-install-ic696ncv/cmake_032fad65d48a4e20b76f6349e09de715/CMake-src/Utilities/cmlibarchive/libarchive/archive_acl.c:40: In file included from /data/data/com.termux/files/usr/tmp/pip-install-ic696ncv/cmake_032fad65d48a4e20b76f6349e09de715/CMake-src/Utilities/cmlibarchive/libarchive/archive_acl_private.h:35: In file included from /data/data/com.termux/files/usr/tmp/pip-install-ic696ncv/cmake_032fad65d48a4e20b76f6349e09de715/CMake-src/Utilities/cmlibarchive/libarchive/archive_string.h:49:
/data/data/com.termux/files/usr/tmp/pip-install-ic696ncv/cmake_032fad65d48a4e20b76f6349e09de715/CMake-src/Utilities/cmlibarchive/libarchive/archive.h:101:10: fatal error: 'android_lf.h' file not found
#include "android_lf.h"
^~~~~~~~~~~~~~ 1 error generated.
make[5]: *** [Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/build.make:76: Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_acl.c.o] Error 1
make[4]: *** [CMakeFiles/Makefile2:1990: Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/all] Error 2 make[3]: *** [Makefile:166: all] Error 2
make[2]: *** [CMakeFiles/CMakeProject-build.dir/build.make:88: CMakeProject-build-prefix/src/CMakeProject-build-stamp/CMakeProject-build-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:113: CMakeFiles/CMakeProject-build.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
File "/data/data/com.termux/files/usr/tmp/pip-build-env-xnh9cr27/overlay/lib/python3.10/site-packages/skbuild/setuptools_wrap.py", line 645, in setup cmkr.make(make_args, install_target=cmake_install_target, env=env) File "/data/data/com.termux/files/usr/tmp/pip-build-env-xnh9cr27/overlay/lib/python3.10/site-packages/skbuild/cmaker.py", line 680, in make
self.make_impl(clargs=clargs, config=config, source_dir=source_dir, install_target=install_target, env=env) File "/data/data/com.termux/files/usr/tmp/pip-build-env-xnh9cr27/overlay/lib/python3.10/site-packages/skbuild/cmaker.py", line 704, in make_impl
raise SKBuildError(
--------------------------------------------------------------------------------
-- Trying "Ninja" generator
--------------------------------
---------------------------
----------------------
----------------- ------------ -------
--
--
-------
------------ -----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja" generator - failure
--------------------------------------------------------------------------------
-------------------------------------------------------------------------------- -- Trying "Unix Makefiles" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
------- -- -- -------
------------
-----------------
----------------------
---------------------------
-------------------------------- -- Trying "Unix Makefiles" generator - success
--------------------------------------------------------------------------------
Configuring Project
Working directory:
/data/data/com.termux/files/usr/tmp/pip-install-ic696ncv/cmake_032fad65d48a4e20b76f6349e09de715/_skbuild/linux-aarch64-3.10/cmake-build
Command:
cmake /data/data/com.termux/files/usr/tmp/pip-install-ic696ncv/cmake_032fad65d48a4e20b76f6349e09de715 -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH=/data/data/com.termux/files/usr/tmp/pip-install-ic696ncv/cmake_032fad65d48a4e20b76f6349e09de715/_skbuild/linux-aarch64-3.10/cmake-install/src/cmake/data -DPYTHON_VERSION_STRING:STRING=3.10.6 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/data/data/com.termux/files/usr/tmp/pip-build-env-xnh9cr27/overlay/lib/python3.10/site-packages/skbuild/resources/cmake -DPython3_EXECUTABLE:FILEPATH=/data/data/com.termux/files/usr/bin/python3 -DPython3_INCLUDE_DIR:PATH=/data/data/com.termux/files/usr/include/python3.10 -DPython3_LIBRARY:PATH=/data/data/com.termux/files/usr/lib/libpython3.10.so -DPython_EXECUTABLE:FILEPATH=/data/data/com.termux/files/usr/bin/python3 -DPython_INCLUDE_DIR:PATH=/data/data/com.termux/files/usr/include/python3.10 -DPython_LIBRARY:PATH=/data/data/com.termux/files/usr/lib/libpython3.10.so -DPYTHON_EXECUTABLE:FILEPATH=/data/data/com.termux/files/usr/bin/python3 -DPYTHON_INCLUDE_DIR:PATH=/data/data/com.termux/files/usr/include/python3.10 -DPYTHON_LIBRARY:PATH=/data/data/com.termux/files/usr/lib/libpython3.10.so -DCMAKE_BUILD_TYPE:STRING=Release
Traceback (most recent call last):
=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install cmake:
1) Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) If on Linux, with glibc < 2.12, you can set PIP_ONLY_BINARY=cmake in
order to retrieve the last manylinux1 compatible wheel.
3) If on Linux, with glibc < 2.12, you can cap "cmake<3.23" in your
requirements in order to retrieve the last manylinux1 compatible wheel.
4) Open an issue with the debug information that follows at
https://github.com/scikit-build/cmake-python-distributions/issues
Python: 3.10.6
platform: Linux-4.14.81-perf+-aarch64-with-libc
machine: aarch64
bits: 64
pip: n/a
setuptools: 63.4.1
scikit-build: 0.15.0
PEP517_BUILD_BACKEND=setuptools.build_meta
=============================DEBUG ASSISTANCE=============================
An error occurred while building with CMake.
Command:
cmake --build . --target install --config Release --
Install target:
install
Source directory:
/data/data/com.termux/files/usr/tmp/pip-install-ic696ncv/cmake_032fad65d48a4e20b76f6349e09de715
Working directory:
/data/data/com.termux/files/usr/tmp/pip-install-ic696ncv/cmake_032fad65d48a4e20b76f6349e09de715/_skbuild/linux-aarch64-3.10/cmake-build
Please check the install target is valid and see CMake's output for more information.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cmake
Failed to build cmake
ERROR: Could not build wheels for cmake, which is required to install pyproject.toml-based projects
[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.
``
Can we use the approach as mentioned by @maxbachmann at here
Hey qiskitters any update ?
Qiskit has compiled extensions, which will make it somewhat tricky to build for platforms that don't have a Rust compiler available. Your examples above seem to be failing before you reach us, somewhere in our dependencies, though, and we can't change that. We provide pre-built wheels for Linux aarch64 compatible with manylinux2014
and commit to supporting those, but once you're outside our list of supported platforms, we can't really help.
If you manage to get something working successfully, we'll be interested to hear about it, but at this time, we don't have the resources to support non-standard Linux distributions or other platforms.
Hi @jakelishman thank you update. That's a genuine choice of platform.
[Although, Its the wish for many enthusiast to have Android (arm64) considered as supported platform as well for many py packages. ]