2

I tried installing web3 on termux by calling

$ pip install web3

But I keep having these errors

Preparing metadata (setup.py) ... error

ERROR: Command errored out with exit status 1:
 command: /data/data/com.termux/files/usr/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/data/com.termux/files/usr/tmp/pip-install-1fyyf1jm/lru-dict_843f88c7a3aa4081ae7dab3e2dca462e/setup.py'"'"'; __file__='"'"'/data/data/com.termux/files/usr/tmp/pip-install-1fyyf1jm/lru-dict_843f88c7a3aa4081ae7dab3e2dca462e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /data/data/com.termux/files/usr/tmp/pip-pip-egg-info-zdcb15z7
     cwd: /data/data/com.termux/files/usr/tmp/pip-install-1fyyf1jm/lru-dict_843f88c7a3aa4081ae7dab3e2dca462e/
Complete output (11 lines):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 19, in <module>
    from setuptools.dist import Distribution
  File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/setuptools/dist.py", line 38, in <module>
    from setuptools import windows_support
  File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/setuptools/windows_support.py", line 2, in <module>
    import ctypes
  File "/data/data/com.termux/files/usr/lib/python3.9/ctypes/__init__.py", line 8, in <module>
    from _ctypes import Union, Structure, Array
ImportError: dlopen failed: cannot locate symbol "ffi_closure_free" referenced by "/data/data/com.termux/files/usr/lib/python3.9/lib-dynload/_ctypes.cpython-39.so"...
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/68/ea/997af58d4e6da019ad825a412f93081d9df67e9dda11cfb026a3d7cd0b6c/lru-dict-1.1.7.tar.gz#sha256=45b81f67d75341d4433abade799a47e9c42a9e22a118531dcb5e549864032d7c (from https://pypi.org/simple/lru-dict/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

In the end I got this message

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

I'm still new to these stuff and I couldn't find answer on the Internet about installing web3 using Termux.

PS: I'm using

  • Termux 0.101 latest version
  • Python 3.9.0
  • My device is ( Samsung A31 SM-A315G) not rooted!
TylerH
  • 20,799
  • 66
  • 75
  • 101
Suhail
  • 21
  • 2

1 Answers1

0

Okay, try this:

  1. Install node.js
pkg Install nodejs
  1. Then, install web3
npm install web3
Tyler2P
  • 2,324
  • 26
  • 22
  • 31