Android pip安装在Termux下的ArchLinux上
使用python 3.6.4: 在一个全新的Termux安装中,我会按照 之后,在ArchLinux中:Android pip安装在Termux下的ArchLinux上,android,python-3.x,archlinux,archlinux-arm,termux,Android,Python 3.x,Archlinux,Archlinux Arm,Termux,使用python 3.6.4: 在一个全新的Termux安装中,我会按照 之后,在ArchLinux中: $ pacman -S python python-pip (success) $ pip install simplejson (or any other package) 并始终获得: running install_egg_info running egg_info writing simplejson.egg-info/PKG-INFO writing d
$ pacman -S python python-pip
(success)
$ pip install simplejson (or any other package)
并始终获得:
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/
而且——用户或pyvenv根本帮不上忙。任何建议,我做错了什么
请注意:
- Android设备没有根目录
- ArchLinux用户是root用户(默认)
- 看起来不错。我可以手动将文件复制到目标目录
更新:对于python 2.7.14,一切都很好。尝试以root用户身份运行它?ArchLinux默认用户是root。Android设备本身不是根用户,因此Termux用户不是根用户。手动处理文件也很有效!权限没有问题。这里的问题肯定是权限问题。所以你有两个选择。通过root安装它(这不可能像你说的那样),或者将它安装到普通用户可以访问的其他地方。
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/