Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to pip install uvloop on Android using Termux #613

Open
DefamationStation opened this issue Aug 1, 2024 · 3 comments
Open

Unable to pip install uvloop on Android using Termux #613

DefamationStation opened this issue Aug 1, 2024 · 3 comments

Comments

@DefamationStation
Copy link

~ $ pip install uvloop
Collecting uvloop
Using cached uvloop-0.19.0.tar.gz (2.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: uvloop
Building wheel for uvloop (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for uvloop (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [256 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-cpython-311
creating build/lib.linux-aarch64-cpython-311/uvloop
copying uvloop/init.py -> build/lib.linux-aarch64-cpython-311/uvloop
copying uvloop/_noop.py -> build/lib.linux-aarch64-cpython-311/uvloop
copying uvloop/_testbase.py -> build/lib.linux-aarch64-cpython-311/uvloop
copying uvloop/_version.py -> build/lib.linux-aarch64-cpython-311/uvloop
running egg_info
writing uvloop.egg-info/PKG-INFO
writing dependency_links to uvloop.egg-info/dependency_links.txt
writing requirements to uvloop.egg-info/requires.txt
writing top-level names to uvloop.egg-info/top_level.txt
reading manifest file 'uvloop.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '' found under directory 'vendor/libuv/.git'
warning: no previously-included files matching '
' found under directory 'vendor/libuv/docs'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/img'
adding license file 'LICENSE-APACHE'
adding license file 'LICENSE-MIT'
writing manifest file 'uvloop.egg-info/SOURCES.txt'
/data/data/com.termux/files/usr/tmp/pip-build-env-x7iwebqy/overlay/lib/python3.11/site-packages/setuptools/command/build_py.py:215: _Warning: Package 'uvloop.handles' is absent from the packages configuration.
!!

          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'uvloop.handles' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.

          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'uvloop.handles' is explicitly added
          to the `packages` configuration field.

          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

          If you don't want 'uvloop.handles' to be distributed and are
          already explicitly excluding 'uvloop.handles' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.

          You can read more about "package data files" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************

  !!
    check.warn(importable)
  /data/data/com.termux/files/usr/tmp/pip-build-env-x7iwebqy/overlay/lib/python3.11/site-packages/setuptools/command/build_py.py:215: _Warning: Package 'uvloop.includes' is absent from the `packages` configuration.
  !!

          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'uvloop.includes' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.

          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'uvloop.includes' is explicitly added
          to the `packages` configuration field.

          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

          If you don't want 'uvloop.includes' to be distributed and are
          already explicitly excluding 'uvloop.includes' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.

          You can read more about "package data files" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************

  !!
    check.warn(importable)
  copying uvloop/cbhandles.pxd -> build/lib.linux-aarch64-cpython-311/uvloop
  copying uvloop/cbhandles.pyx -> build/lib.linux-aarch64-cpython-311/uvloop
  copying uvloop/dns.pyx -> build/lib.linux-aarch64-cpython-311/uvloop
  copying uvloop/errors.pyx -> build/lib.linux-aarch64-cpython-311/uvloop
  copying uvloop/loop.pxd -> build/lib.linux-aarch64-cpython-311/uvloop
  copying uvloop/loop.pyi -> build/lib.linux-aarch64-cpython-311/uvloop
  copying uvloop/loop.pyx -> build/lib.linux-aarch64-cpython-311/uvloop
  copying uvloop/lru.pyx -> build/lib.linux-aarch64-cpython-311/uvloop
  copying uvloop/pseudosock.pyx -> build/lib.linux-aarch64-cpython-311/uvloop
  copying uvloop/py.typed -> build/lib.linux-aarch64-cpython-311/uvloop
  copying uvloop/request.pxd -> build/lib.linux-aarch64-cpython-311/uvloop
  copying uvloop/request.pyx -> build/lib.linux-aarch64-cpython-311/uvloop
  copying uvloop/server.pxd -> build/lib.linux-aarch64-cpython-311/uvloop
  copying uvloop/server.pyx -> build/lib.linux-aarch64-cpython-311/uvloop
  copying uvloop/sslproto.pxd -> build/lib.linux-aarch64-cpython-311/uvloop
  copying uvloop/sslproto.pyx -> build/lib.linux-aarch64-cpython-311/uvloop
  creating build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/async_.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/async_.pyx -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/basetransport.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/basetransport.pyx -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/check.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/check.pyx -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/fsevent.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/fsevent.pyx -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/handle.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/handle.pyx -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/idle.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/idle.pyx -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/pipe.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/pipe.pyx -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/poll.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/poll.pyx -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/process.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/process.pyx -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/stream.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/stream.pyx -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/streamserver.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/streamserver.pyx -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/tcp.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/tcp.pyx -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/timer.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/timer.pyx -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/udp.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  copying uvloop/handles/udp.pyx -> build/lib.linux-aarch64-cpython-311/uvloop/handles
  creating build/lib.linux-aarch64-cpython-311/uvloop/includes
  copying uvloop/includes/__init__.py -> build/lib.linux-aarch64-cpython-311/uvloop/includes
  copying uvloop/includes/consts.pxi -> build/lib.linux-aarch64-cpython-311/uvloop/includes
  copying uvloop/includes/debug.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/includes
  copying uvloop/includes/flowcontrol.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/includes
  copying uvloop/includes/python.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/includes
  copying uvloop/includes/stdlib.pxi -> build/lib.linux-aarch64-cpython-311/uvloop/includes
  copying uvloop/includes/system.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/includes
  copying uvloop/includes/uv.pxd -> build/lib.linux-aarch64-cpython-311/uvloop/includes
  running build_ext
  checking for a BSD-compatible install... /data/data/com.termux/files/usr/bin/install -c
  checking whether build environment is sane... yes
  checking for a race-free mkdir -p... /data/data/com.termux/files/usr/bin/mkdir -p
  checking for gawk... gawk
  checking whether make sets $(MAKE)... yes
  checking whether make supports nested variables... yes
  checking whether to enable maintainer-specific portions of Makefiles... yes
  checking build system type... aarch64-unknown-linux-gnu
  checking host system type... aarch64-unknown-linux-gnu
  checking for gcc... gcc
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.out
  checking for suffix of executables...
  checking whether we are cross compiling... no
  checking for suffix of object files... o
  checking whether the compiler supports GNU C... yes
  checking whether gcc accepts -g... yes
  checking for gcc option to enable C11 features... none needed
  checking whether gcc understands -c and -o together... yes
  checking whether make supports the include directive... yes (GNU style)
  checking dependency style of gcc... gcc3
  checking for gcc way to treat warnings as errors... -Werror
  checking if gcc supports __attribute__(( visibility("default") ))... yes
  checking if gcc supports -fvisibility=hidden... yes
  checking if gcc supports -fno-strict-aliasing flag... yes
  checking if gcc supports -fno-strict-aliasing flag... yes
  checking if gcc supports -g flag... yes
  checking if gcc supports -std=gnu89 flag... yes
  checking if gcc supports -Wall flag... yes
  checking if gcc supports -Wextra flag... yes
  checking if gcc supports -Wno-long-long flag... yes
  checking if gcc supports -Wno-unused-parameter flag... yes
  checking if gcc supports -Wstrict-prototypes flag... yes
  checking for ar... no
  checking for lib... no
  checking for link... link -lib
  checking the archiver (link -lib) interface... unknown
  configure: error: could not determine link -lib interface
  Traceback (most recent call last):
    File "/data/data/com.termux/files/usr/lib/python3.11/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.11/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.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 313, in run_setup
      exec(code, locals())
    File "<string>", line 233, in <module>
    File "/data/data/com.termux/files/usr/tmp/pip-build-env-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/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-x7iwebqy/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
      self.build_extensions()
    File "<string>", line 196, in build_extensions
    File "<string>", line 175, in build_libuv
    File "/data/data/com.termux/files/usr/lib/python3.11/subprocess.py", line 571, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['./configure']' 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 uvloop
Failed to build uvloop
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (uvloop)
~ $

@DefamationStation
Copy link
Author

Please close issue i solved this by building the libuv library manually by first installing binutils

It was failing due to the absence of a suitable linker (ld) in the PATH

@nikhilgrajput
Copy link

I am facing the same issue. can you please explain it more simplified word or if possible can let me know the steps you followed to resolve the issue. I am trying to install uiautodev to which uvloop is one of its dependencies.

@python-and-fiction
Copy link

try to pkg install binutils and pkg install libuv first @nikhilgrajput

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants