PyPI: Do not install as root

Published: 2019-09-18

Found this issue about PyPI:

pip3 install asciidoc3 - issues/concerns on AIX-python3-3.7 #79
Wanted to use asciidoc to create current man pages for git, but cannot get asciidoc3 to run.

root@...:[/home/root]pip3 install asciidoc3
Collecting asciidoc3
  Downloading https://files.pythonhosted.org/packages/be/e9/defb4373cca5e1d42c...
 |################################| 778kB 7.7MB/s
Installing collected packages: asciidoc3
  Running setup.py install for asciidoc3 ... done
Successfully installed asciidoc3-3.1.0.post4
...
root@...:[/home/root]asciidoc3
Traceback (most recent call last):
  ...
  File "/opt/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2417 ...
ModuleNotFoundError: No module named 'asciidoc3'
...
Can always be user-error, but generally, it just installs.
Maybe the .post4 bit is in the way, but I do not know what to correct.
Suggestions welcome.

And our answer:

Indeed the PyPI/pip installation as root does not work.
That is a known amd intended behavior: because of the many conf-files you need to run asciidoc3_postinstall immediately after pip3 install. This makes only sense as a normal user (not root) with option --user:
normaluser$ pip3 install --user asciidoc3
For system wide installation (as root) we recommend to download the tarball asciidoc3-3.1.0.tar.gz
All information is found here: https://asciidoc3.org.

Keywords: asciidoc3 pypi pip root aix

links