Installation fails if running not under root
When running pip install as a normal user, installation fails trying to write /usr/include/lisaconstants.hpp:
Installing collected packages: lisaconstants
Running setup.py install for lisaconstants: started
Running setup.py install for lisaconstants: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-w6eq5y7k/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-w6eq5y7k/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-record-vk705qs1/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/testuser/.local/include/python3.8/lisaconstants
cwd: /tmp/pip-req-build-w6eq5y7k/
Complete output (32 lines):
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/lisaconstants
copying lisaconstants/__init__.py -> build/lib/lisaconstants
copying lisaconstants/cheader.py -> build/lib/lisaconstants
copying lisaconstants/constants.py -> build/lib/lisaconstants
copying lisaconstants/meta.py -> build/lib/lisaconstants
running install_lib
creating /home/testuser/.local/lib/python3.8/site-packages/lisaconstants
copying build/lib/lisaconstants/__init__.py -> /home/testuser/.local/lib/python3.8/site-packages/lisaconstants
copying build/lib/lisaconstants/cheader.py -> /home/testuser/.local/lib/python3.8/site-packages/lisaconstants
copying build/lib/lisaconstants/constants.py -> /home/testuser/.local/lib/python3.8/site-packages/lisaconstants
copying build/lib/lisaconstants/meta.py -> /home/testuser/.local/lib/python3.8/site-packages/lisaconstants
byte-compiling /home/testuser/.local/lib/python3.8/site-packages/lisaconstants/__init__.py to __init__.cpython-38.pyc
byte-compiling /home/testuser/.local/lib/python3.8/site-packages/lisaconstants/cheader.py to cheader.cpython-38.pyc
byte-compiling /home/testuser/.local/lib/python3.8/site-packages/lisaconstants/constants.py to constants.cpython-38.pyc
byte-compiling /home/testuser/.local/lib/python3.8/site-packages/lisaconstants/meta.py to meta.cpython-38.pyc
running install_egg_info
running egg_info
writing lisaconstants.egg-info/PKG-INFO
writing dependency_links to lisaconstants.egg-info/dependency_links.txt
writing top-level names to lisaconstants.egg-info/top_level.txt
reading manifest file 'lisaconstants.egg-info/SOURCES.txt'
writing manifest file 'lisaconstants.egg-info/SOURCES.txt'
Copying lisaconstants.egg-info to /home/testuser/.local/lib/python3.8/site-packages/lisaconstants-1.0.egg-info
running install_scripts
writing list of installed files to '/tmp/pip-record-vk705qs1/install-record.txt'
installing C++ header file -> /usr/include/lisaconstants.hpp
error: [Errno 13] Permission denied: '/usr/include/lisaconstants.hpp'
Edited by Jakob