PYTHONASYNCIODEBUG in env?:just wanna try uvloop on my device (arch64 Android) using termux
i have installed from pip with command line pip3 install uvloop
ERROR: Complete output from command /data/data/com.termux/files/usr/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/data/data/com.termux/files/usr/tmp/pip-install-6lmpj6mb/uvloop/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /data/data/com.termux/files/usr/tmp/pip-record-2wa2r5db/install-record.txt --single-version-externally-managed --compile:
ERROR: running install
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.7
creating build/lib.linux-aarch64-3.7/uvloop
copying uvloop/__init__.py -> build/lib.linux-aarch64-3.7/uvloop
copying uvloop/_patch.py -> build/lib.linux-aarch64-3.7/uvloop
copying uvloop/_testbase.py -> build/lib.linux-aarch64-3.7/uvloop
copying uvloop/_noop.py -> build/lib.linux-aarch64-3.7/uvloop
running egg_info
writing uvloop.egg-info/PKG-INFO
writing dependency_links to uvloop.egg-info/dependency_links.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'
writing manifest file 'uvloop.egg-info/SOURCES.txt'
copying uvloop/cbhandles.pxd -> build/lib.linux-aarch64-3.7/uvloop
copying uvloop/cbhandles.pyx -> build/lib.linux-aarch64-3.7/uvloop
copying uvloop/dns.pyx -> build/lib.linux-aarch64-3.7/uvloop
copying uvloop/errors.pyx -> build/lib.linux-aarch64-3.7/uvloop
copying uvloop/loop.c -> build/lib.linux-aarch64-3.7/uvloop
copying uvloop/loop.pxd -> build/lib.linux-aarch64-3.7/uvloop
copying uvloop/loop.pyx -> build/lib.linux-aarch64-3.7/uvloop
copying uvloop/pseudosock.pyx -> build/lib.linux-aarch64-3.7/uvloop
copying uvloop/request.pxd -> build/lib.linux-aarch64-3.7/uvloop
copying uvloop/request.pyx -> build/lib.linux-aarch64-3.7/uvloop
copying uvloop/server.pxd -> build/lib.linux-aarch64-3.7/uvloop
copying uvloop/server.pyx -> build/lib.linux-aarch64-3.7/uvloop
copying uvloop/sslproto.pxd -> build/lib.linux-aarch64-3.7/uvloop
copying uvloop/sslproto.pyx -> build/lib.linux-aarch64-3.7/uvloop
creating build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/async_.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/async_.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/basetransport.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/basetransport.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/check.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/check.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/handle.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/handle.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/idle.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/idle.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/pipe.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/pipe.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/poll.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/poll.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/process.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/process.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/stream.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/stream.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/streamserver.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/streamserver.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/tcp.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/tcp.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/timer.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/timer.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/udp.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles
copying uvloop/handles/udp.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles
creating build/lib.linux-aarch64-3.7/uvloop/includes
copying uvloop/includes/__init__.py -> build/lib.linux-aarch64-3.7/uvloop/includes
copying uvloop/includes/compat.h -> build/lib.linux-aarch64-3.7/uvloop/includes
copying uvloop/includes/consts.pxi -> build/lib.linux-aarch64-3.7/uvloop/includes
copying uvloop/includes/debug.h -> build/lib.linux-aarch64-3.7/uvloop/includes
copying uvloop/includes/debug.pxd -> build/lib.linux-aarch64-3.7/uvloop/includes
copying uvloop/includes/flowcontrol.pxd -> build/lib.linux-aarch64-3.7/uvloop/includes
copying uvloop/includes/python.pxd -> build/lib.linux-aarch64-3.7/uvloop/includes
copying uvloop/includes/stdlib.pxi -> build/lib.linux-aarch64-3.7/uvloop/includes
copying uvloop/includes/system.pxd -> build/lib.linux-aarch64-3.7/uvloop/includes
copying uvloop/includes/uv.pxd -> build/lib.linux-aarch64-3.7/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 thread-safe mkdir -p... /data/data/com.termux/files/usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
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 we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... none
checking dependency style of gcc... none
checking if gcc supports -pedantic flag... yes
checking for gcc way to treat warnings as errors... -Werror
checking if gcc supports -fvisibility=hidden... 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-unused-parameter flag... yes
checking if gcc supports -Wstrict-prototypes flag... yes
checking for ar... ar
checking the archiver (ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... /data/data/com.termux/files/usr/bin/sed
checking for grep that handles long lines and -e... /data/data/com.termux/files/usr/bin/grep
checking for egrep... /data/data/com.termux/files/usr/bin/grep -E
checking for fgrep... /data/data/com.termux/files/usr/bin/grep -F
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether make supports nested variables... (cached) no
checking for dlopen in -ldl... yes
checking for kstat_lookup in -lkstat... no
checking for gethostbyname in -lnsl... no
checking for perfstat_cpu in -lperfstat... no
checking for pthread_mutex_init in -lpthread... yes
checking for clock_gettime in -lrt... yes
checking for sendfile in -lsendfile... no
checking for socket in -lsocket... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking sys/ahafs_evProds.h usability... no
checking sys/ahafs_evProds.h presence... no
checking for sys/ahafs_evProds.h... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libuv.pc
config.status: executing depfiles commands
config.status: executing libtool commands
error: [Errno 2] No such file or directory: 'make': 'make'
----------------------------------------
ERROR: Command "/data/data/com.termux/files/usr/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/data/data/com.termux/files/usr/tmp/pip-install-6lmpj6mb/uvloop/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /data/data/com.termux/files/usr/tmp/pip-record-2wa2r5db/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /data/data/com.termux/files/usr/tmp/pip-install-6lmpj6mb/uvloop/
- uvloop version:
- Python version: 3.7
- Platform:
- Can you reproduce the bug with
PYTHONASYNCIODEBUGin env?:just wanna try
uvloopon my device (arch64 Android) using termuxi have installed from pip with command line
pip3 install uvloopERROR: Complete output from command /data/data/com.termux/files/usr/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/data/data/com.termux/files/usr/tmp/pip-install-6lmpj6mb/uvloop/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /data/data/com.termux/files/usr/tmp/pip-record-2wa2r5db/install-record.txt --single-version-externally-managed --compile: ERROR: running install running build running build_py creating build creating build/lib.linux-aarch64-3.7 creating build/lib.linux-aarch64-3.7/uvloop copying uvloop/__init__.py -> build/lib.linux-aarch64-3.7/uvloop copying uvloop/_patch.py -> build/lib.linux-aarch64-3.7/uvloop copying uvloop/_testbase.py -> build/lib.linux-aarch64-3.7/uvloop copying uvloop/_noop.py -> build/lib.linux-aarch64-3.7/uvloop running egg_info writing uvloop.egg-info/PKG-INFO writing dependency_links to uvloop.egg-info/dependency_links.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' writing manifest file 'uvloop.egg-info/SOURCES.txt' copying uvloop/cbhandles.pxd -> build/lib.linux-aarch64-3.7/uvloop copying uvloop/cbhandles.pyx -> build/lib.linux-aarch64-3.7/uvloop copying uvloop/dns.pyx -> build/lib.linux-aarch64-3.7/uvloop copying uvloop/errors.pyx -> build/lib.linux-aarch64-3.7/uvloop copying uvloop/loop.c -> build/lib.linux-aarch64-3.7/uvloop copying uvloop/loop.pxd -> build/lib.linux-aarch64-3.7/uvloop copying uvloop/loop.pyx -> build/lib.linux-aarch64-3.7/uvloop copying uvloop/pseudosock.pyx -> build/lib.linux-aarch64-3.7/uvloop copying uvloop/request.pxd -> build/lib.linux-aarch64-3.7/uvloop copying uvloop/request.pyx -> build/lib.linux-aarch64-3.7/uvloop copying uvloop/server.pxd -> build/lib.linux-aarch64-3.7/uvloop copying uvloop/server.pyx -> build/lib.linux-aarch64-3.7/uvloop copying uvloop/sslproto.pxd -> build/lib.linux-aarch64-3.7/uvloop copying uvloop/sslproto.pyx -> build/lib.linux-aarch64-3.7/uvloop creating build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/async_.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/async_.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/basetransport.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/basetransport.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/check.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/check.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/handle.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/handle.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/idle.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/idle.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/pipe.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/pipe.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/poll.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/poll.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/process.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/process.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/stream.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/stream.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/streamserver.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/streamserver.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/tcp.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/tcp.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/timer.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/timer.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/udp.pxd -> build/lib.linux-aarch64-3.7/uvloop/handles copying uvloop/handles/udp.pyx -> build/lib.linux-aarch64-3.7/uvloop/handles creating build/lib.linux-aarch64-3.7/uvloop/includes copying uvloop/includes/__init__.py -> build/lib.linux-aarch64-3.7/uvloop/includes copying uvloop/includes/compat.h -> build/lib.linux-aarch64-3.7/uvloop/includes copying uvloop/includes/consts.pxi -> build/lib.linux-aarch64-3.7/uvloop/includes copying uvloop/includes/debug.h -> build/lib.linux-aarch64-3.7/uvloop/includes copying uvloop/includes/debug.pxd -> build/lib.linux-aarch64-3.7/uvloop/includes copying uvloop/includes/flowcontrol.pxd -> build/lib.linux-aarch64-3.7/uvloop/includes copying uvloop/includes/python.pxd -> build/lib.linux-aarch64-3.7/uvloop/includes copying uvloop/includes/stdlib.pxi -> build/lib.linux-aarch64-3.7/uvloop/includes copying uvloop/includes/system.pxd -> build/lib.linux-aarch64-3.7/uvloop/includes copying uvloop/includes/uv.pxd -> build/lib.linux-aarch64-3.7/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 thread-safe mkdir -p... /data/data/com.termux/files/usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... no checking whether make supports nested variables... no 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 we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for style of include used by make... none checking dependency style of gcc... none checking if gcc supports -pedantic flag... yes checking for gcc way to treat warnings as errors... -Werror checking if gcc supports -fvisibility=hidden... 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-unused-parameter flag... yes checking if gcc supports -Wstrict-prototypes flag... yes checking for ar... ar checking the archiver (ar) interface... ar checking how to print strings... printf checking for a sed that does not truncate output... /data/data/com.termux/files/usr/bin/sed checking for grep that handles long lines and -e... /data/data/com.termux/files/usr/bin/grep checking for egrep... /data/data/com.termux/files/usr/bin/grep -E checking for fgrep... /data/data/com.termux/files/usr/bin/grep -F checking for mt... no checking if : is a manifest tool... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... yes checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking whether make supports nested variables... (cached) no checking for dlopen in -ldl... yes checking for kstat_lookup in -lkstat... no checking for gethostbyname in -lnsl... no checking for perfstat_cpu in -lperfstat... no checking for pthread_mutex_init in -lpthread... yes checking for clock_gettime in -lrt... yes checking for sendfile in -lsendfile... no checking for socket in -lsocket... no checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking sys/ahafs_evProds.h usability... no checking sys/ahafs_evProds.h presence... no checking for sys/ahafs_evProds.h... no checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating libuv.pc config.status: executing depfiles commands config.status: executing libtool commands error: [Errno 2] No such file or directory: 'make': 'make' ---------------------------------------- ERROR: Command "/data/data/com.termux/files/usr/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/data/data/com.termux/files/usr/tmp/pip-install-6lmpj6mb/uvloop/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /data/data/com.termux/files/usr/tmp/pip-record-2wa2r5db/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /data/data/com.termux/files/usr/tmp/pip-install-6lmpj6mb/uvloop/
solved by installing make with pkg install make
then now i includ uvloop for my asyncio by code
import asyncio
import uvloop
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
after run i get traceback like this
ImportError: dlopen failed: cannot locate symbol "uv__pthread_sigmask" referenced by "/data/data/com.termux/files/usr/lib/python3.7/site-packages/uvloop/loop.cpython-37m.so"
Your current issue is because libuv does not compile cleanly on TermUX.
TermUX provides its own libuv package, and as you can see here https://github.com/termux/termux-packages/blob/master/packages/libuv/pthread-sigmask.patch it has to patch out uv__pthread_sigmask. So, the easiest way is to use the provided libuv with uvloop.
I've installed uvloop on TermUX successfully with the following steps:
pkg install libuvpip download uvloopcd into itpython setup.py build_ext --use-system-libuvpython setup.py installThis feels like something that should be sorted out upstream in libuv itself as I don't think uvloop can shoulder the burden of integrating fixes / workarounds for all OSes. Thoughts @1st1 ?
I would say this really is a quirk of TermUX.
Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager. https://termux.com/
Basically TermUX provides a rather complete Linux environment inside an Android app, and its environment is sufficiently different from stock Android that libuv does not compile cleanly inside TermUX. TermUX provides a package for libuv, and they patched out some Android-specific parts, as linked in my previous response. I personally don't think uvloop or libuv needs to integrate any TermUX-specific fixes, since TermUX already provides their own libuv package.
On the other hand, uvloop could improve the experience of installing with the use-system-libuv option. It would be best if we can simply add some options to pip install uvloop and make it use system-wide libuv.
(The method to build uvloop with system-wide libuv in my previous response actually has a problem that python setup.py install will attempt to build the included libuv anyways even though it ends up using the extensions built in the previous step, so those procedures are not good. The best way to build with system-wide libuv that I have found is to manually edit setup.py and change this line to True: https://github.com/MagicStack/uvloop/blob/1eb6727437430fe0500d7f044dd6e4432abd0901/setup.py#L90 )
Your current issue is because libuv does not compile cleanly on TermUX.
TermUX provides its own
libuvpackage, and as you can see here https://github.com/termux/termux-packages/blob/master/packages/libuv/pthread-sigmask.patch it has to patch outuv__pthread_sigmask. So, the easiest way is to use the providedlibuvwithuvloop.I've installed
uvloopon TermUX successfully with the following steps:
pkg install libuvpip download uvloop- expand the tar.gz archive somewhere and
cdinto itpython setup.py build_ext --use-system-libuvpython setup.py install
i follow your step by step as well as i can
and i get this error
Python 3.7.4 (default, Jul 11 2019, 08:41:31)
[Clang 8.0.7 (https://android.googlesource.com/toolchain/clang b55f2d4ebfd35bf6 on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import uvloop
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/data/com.termux/files/home/uvloop-0.13.0/uvloop/__init__.py", line 7, in <module>
from .loop import Loop as __BaseLoop # NOQA
ModuleNotFoundError: No module named 'uvloop.loop'
I would say this really is a quirk of TermUX.
Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager. https://termux.com/
Basically TermUX provides a rather complete Linux environment inside an Android app, and its environment is sufficiently different from stock Android that
libuvdoes not compile cleanly inside TermUX. TermUX provides a package forlibuv, and they patched out some Android-specific parts, as linked in my previous response. I personally don't think uvloop or libuv needs to integrate any TermUX-specific fixes, since TermUX already provides their ownlibuvpackage.On the other hand, uvloop could improve the experience of installing with the
use-system-libuvoption. It would be best if we can simply add some options topip install uvloopand make it use system-wide libuv.(The method to build
uvloopwith system-widelibuvin my previous response actually has a problem thatpython setup.py installwill attempt to build the includedlibuvanyways even though it ends up using the extensions built in the previous step, so those procedures are not good. The best way to build with system-widelibuvthat I have found is to manually editsetup.pyand change this line to True:https://github.com/MagicStack/uvloop/blob/1eb6727437430fe0500d7f044dd6e4432abd0901/setup.py#L90
)
i try this too and getting same error like This
Thanks for advice, this issue was solved
last issue i run python in directory of unvloop localy
Your current issue is because libuv does not compile cleanly on TermUX.
TermUX provides its own
libuvpackage, and as you can see here https://github.com/termux/termux-packages/blob/master/packages/libuv/pthread-sigmask.patch it has to patch outuv__pthread_sigmask. So, the easiest way is to use the providedlibuvwithuvloop.I've installed
uvloopon TermUX successfully with the following steps:
pkg install libuvpip download uvloop- expand the tar.gz archive somewhere and
cdinto itpython setup.py build_ext --use-system-libuvpython setup.py install
ah, one year apart anf this is the solution on termux. anyway some step when you get permission denied in ./configure when running python setup.py install, just
chmod +x vendor/libuv/configure
after that, I can install it on my old aarch64 device. love it ;)
Most helpful comment
Your current issue is because libuv does not compile cleanly on TermUX.
TermUX provides its own
libuvpackage, and as you can see here https://github.com/termux/termux-packages/blob/master/packages/libuv/pthread-sigmask.patch it has to patch outuv__pthread_sigmask. So, the easiest way is to use the providedlibuvwithuvloop.I've installed
uvloopon TermUX successfully with the following steps:pkg install libuvpip download uvloopcdinto itpython setup.py build_ext --use-system-libuvpython setup.py install