4

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Boris Brodski
  • 8,425
  • 4
  • 40
  • 55
  • Try running it as root? – Dan13_ Jan 06 '18 at 10:13
  • ArchLinux default user is root. The Android device itself is not rooted, so the Termux user is not root. Also coping the files manually works! Permissions are ok. – Boris Brodski Jan 06 '18 at 10:19
  • The issue here is definitly a permission issue. So you have two choices. Install it via root (this is not possible like you said) or installing it somewhere else where your normal user has access to it. – Shibumi Mar 11 '18 at 17:03

0 Answers0