The pip install is broken on Arch Linux under Termux

1.9k Views Asked by At

With Python 3.6.4:

In a fresh Termux (terminal emulator for Android) installation, I do according to PRoot:

pkg install wget
wget https://raw.githubusercontent.com/sdrausty/TermuxArch/master/setupTermuxArch.sh
bash setupTermuxArch.sh

After that in Arch Linux:

pacman -S python python-pip

Output:

(success)

And:

pip install simplejson (or any other package)

And I always get:

running install_egg_info
    running egg_info
    writing simplejson.egg-info/PKG-INFO
    writing dependency_links to simplejson.egg-info/dependency_links.txt
    writing top-level names to simplejson.egg-info/top_level.txt
    reading manifest file 'simplejson.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'simplejson.egg-info/SOURCES.txt'
    Copying simplejson.egg-info to /root/.local/lib/python3.6/site-packages/simplejson-3.13.2-py3.6.egg-info
    error: [Errno 13] Permission denied: '/root/.local/lib/python3.6/site-packages/simplejson-3.13.2-py3.6.egg-info/PKG-INFO'

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-r_x__623/simplejson/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-4dfnzavt-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-r_x__623/simplejson/

Also --user or pyvenv don't help at all. What am I doing wrong?

Please note:

  • The Android device is not rooted
  • The Arch Linux user is root (default)
  • Permissions look good. I can copy files manually to the destination directory just OK.

With Python 2.7.14, everything works well.

0

There are 0 best solutions below