question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Traceback during installation in Termux

See original GitHub issue
Process of installation:
pip3 install mitmproxy
Collecting mitmproxy
  Using cached mitmproxy-2.0.2-py3-none-any.whl
Collecting ruamel.yaml<0.14,>=0.13.2 (from mitmproxy)
  Using cached ruamel.yaml-0.13.14.tar.gz
Collecting kaitaistruct<0.7,>=0.6 (from mitmproxy)
  Downloading kaitaistruct-0.6.tar.gz
Collecting html2text<=2016.9.19,>=2016.1.8 (from mitmproxy)
  Using cached html2text-2016.9.19.tar.gz
Collecting pyperclip<1.6,>=1.5.22 (from mitmproxy)
  Downloading pyperclip-1.5.32.tar.gz
Collecting passlib<1.8,>=1.6.5 (from mitmproxy)
  Downloading passlib-1.7.1-py2.py3-none-any.whl (498kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 501kB 327kB/s
Collecting pyOpenSSL<17.0,>=16.0 (from mitmproxy)
  Downloading pyOpenSSL-16.2.0-py2.py3-none-any.whl (43kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 51kB 722kB/s
Collecting tornado<4.5,>=4.3 (from mitmproxy)
  Using cached tornado-4.4.3.tar.gz
Collecting watchdog<0.9,>=0.8.3 (from mitmproxy)
  Using cached watchdog-0.8.3.tar.gz
Collecting pyparsing<2.3,>=2.1.3 (from mitmproxy)
  Using cached pyparsing-2.2.0-py2.py3-none-any.whl
Collecting cssutils<1.1,>=1.0.1 (from mitmproxy)
  Using cached cssutils-1.0.2-py3-none-any.whl
Collecting h2<3,>=2.5.1 (from mitmproxy)
  Using cached h2-2.6.2-py2.py3-none-any.whl
Requirement already satisfied: certifi>=2015.11.20.1 in /data/data/com.termux/files/usr/lib/python3.6/site-packages (from mitmproxy)
Requirement already satisfied: setuptools!=29.0.0,>=11.3 in /data/data/com.termux/files/usr/lib/python3.6/site-packages (from mitmproxy)
Collecting cryptography<1.9,>=1.3 (from mitmproxy)
  Using cached cryptography-1.8.2.tar.gz
Collecting jsbeautifier<1.7,>=1.6.3 (from mitmproxy)
  Using cached jsbeautifier-1.6.14.tar.gz
Collecting hyperframe<5,>=4.0.1 (from mitmproxy)
  Using cached hyperframe-4.0.2-py2.py3-none-any.whl
Collecting pyasn1<0.3,>=0.1.9 (from mitmproxy)
  Using cached pyasn1-0.2.3-py2.py3-none-any.whl
Collecting urwid<1.4,>=1.3.1 (from mitmproxy)
  Using cached urwid-1.3.1.tar.gz
Collecting sortedcontainers<1.6,>=1.5.4 (from mitmproxy)
  Using cached sortedcontainers-1.5.9-py2.py3-none-any.whl
Collecting click<7,>=6.2 (from mitmproxy)
  Using cached click-6.7-py2.py3-none-any.whl
Collecting construct<2.9,>=2.8 (from mitmproxy)
  Using cached construct-2.8.22.tar.gz
Collecting blinker<1.5,>=1.4 (from mitmproxy)
  Using cached blinker-1.4.tar.gz
Requirement already satisfied: requests<3,>=2.9.1 in /data/data/com.termux/files/usr/lib/python3.6/site-packages (from mitmproxy)
Collecting brotlipy<0.7,>=0.5.1 (from mitmproxy)
  Using cached brotlipy-0.6.0.tar.gz
    Complete output from command python setup.py egg_info:
    c/_cffi_backend.c:15:10: fatal error: 'ffi.h' file not found
    #include <ffi.h>
             ^~~~~~~
    1 error generated.
    Traceback (most recent call last):
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/unixccompiler.py", line 118, in _compile
        extra_postargs)
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
        % (cmd, exit_status))
    distutils.errors.DistutilsExecError: command 'aarch64-linux-android-clang' failed with exit status 1

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 161, in run
        cmd = self.call_command('install_lib', warn_dir=0)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 147, in call_command
        self.run_command(cmdname)
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/command/install_lib.py", line 11, in run
        self.build()
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/command/install_lib.py", line 107, in build
        self.run_command('build_ext')
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 75, in run
        _build_ext.run(self)
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/command/build_ext.py", line 339, in run
        self.build_extensions()
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
        self._build_extensions_serial()
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
        self.build_extension(ext)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
        _build_ext.build_extension(self, ext)
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
        depends=ext.depends)
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/ccompiler.py", line 574, in compile
        self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/unixccompiler.py", line 120, in _compile
        raise CompileError(msg)
    distutils.errors.CompileError: command 'aarch64-linux-android-clang' failed with exit status 1

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 157, in save_modules
        yield saved
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 198, in setup_context
        yield
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 248, in run_setup
        DirectorySandbox(setup_dir).run(runner)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 278, in run
        return func()
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 246, in runner
        _execfile(setup_script, ns)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 47, in _execfile
        exec(code, globals, locals)
      File "/data/data/com.termux/files/usr/tmp/easy_install-ovl76emg/cffi-1.11.4/setup.py", line 236, in <module>
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/core.py", line 163, in setup
        raise SystemExit("error: " + str(msg))
    SystemExit: error: command 'aarch64-linux-android-clang' failed with exit status 1

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1101, in run_setup
        run_setup(setup_script, args)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 251, in run_setup
        raise
      File "/data/data/com.termux/files/usr/lib/python3.6/contextlib.py", line 99, in __exit__
        self.gen.throw(type, value, traceback)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 198, in setup_context
        yield
      File "/data/data/com.termux/files/usr/lib/python3.6/contextlib.py", line 99, in __exit__
        self.gen.throw(type, value, traceback)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 169, in save_modules
        saved_exc.resume()
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 144, in resume
        six.reraise(type, exc, self._tb)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/pkg_resources/_vendor/six.py", line 685, in reraise
        raise value.with_traceback(tb)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 157, in save_modules
        yield saved
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 198, in setup_context
        yield
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 248, in run_setup
        DirectorySandbox(setup_dir).run(runner)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 278, in run
        return func()
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 246, in runner
        _execfile(setup_script, ns)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 47, in _execfile
        exec(code, globals, locals)
      File "/data/data/com.termux/files/usr/tmp/easy_install-ovl76emg/cffi-1.11.4/setup.py", line 236, in <module>
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/core.py", line 163, in setup
        raise SystemExit("error: " + str(msg))
    SystemExit: error: command 'aarch64-linux-android-clang' failed with exit status 1

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
File "<string>", line 1, in <module>
      File "/data/data/com.termux/files/usr/tmp/pip-build-u21q73o_/brotlipy/setup.py", line 84, in <module>
        "Programming Language :: Python :: 3.5",
      File "/data/data/com.termux/files/usr/lib/python3.6/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/dist.py", line 315, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
        replace_conflicting=True,
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 850, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1122, in best_match
        return self.obtain(req, installer)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1134, in obtain
        return installer(requirement)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
        return cmd.easy_install(req)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 665, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 695, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 876, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1115, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1103, in run_setup
        raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with error: command 'aarch64-linux-android-clang' failed with exit status 1

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /data/data/com.termux/files/usr/tmp/pip-build-u21q73o_/brotlipy/

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
PawelSuwinskicommented, Mar 19, 2020

I have the same issue with compilation on termux on aarch64 (tried also manually with PyInstaller and Nuitka), but after all Development Setup installation works and make it usable.

0reactions
N-isha-ncommented, Dec 3, 2022

Traceback (most recent call last): File β€œ/data/data/com.termux/files/home/osi.ig/main.py”, line 16, in <module> user_info(usrname=args[β€œuser”]) File β€œ/data/data/com.termux/files/home/osi.ig/.lib/api.py”, line 70, in user_info js = json.loads(resp_js) ^^^^^^^^^^^^^^^^^^^ File β€œ/data/data/com.termux/files/usr/lib/python3.11/json/init.py”, line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File β€œ/data/data/com.termux/files/usr/lib/python3.11/json/decoder.py”, line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File β€œ/data/data/com.termux/files/usr/lib/python3.11/json/decoder.py”, line 355, in raw_decode raise JSONDecodeError(β€œExpecting value”, s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Help me to fix this error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HOW TO FIX ALL ERROR OF TERMUX AND INSTALL ALL ...
Today We Learn How to Download or install All Termux Pkg/Tools In One Click!
Read more >
cannot use the pip command on termux ubunty , says OSError ...
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/_vendor/platformdirs/android.py", line 85, in _android_folderΒ ...
Read more >
Home Assistant Core on Android Tablet - #143 by tobihass
Did you install rustup? I had that issue too on termux (sandboxed Linux app for Android), rustup doesn't support termux based builds.
Read more >
Error running PIP after version upgrade : r/termux - Reddit
I installed python compiling its source code, then… ... ModuleNotFoundError: No module named 'jnius' During handling of the above exception,Β ...
Read more >
How to install VS Code in an Android Phone? - CodeWithHarry
In this post, we will see how you can install vs code on an android device. We will use one of the most...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found