Setup tries to put headers into a system directory (permission error)
Hi @maudelejeune it seems that the setup tries to put something into a system dir. So if one is not root it seems to fail.
(.inrep-proto) wiesner@kwiesner-MacBookPro inrep_proto % python -m pip install ../constants
Defaulting to user installation because normal site-packages is not writeable
Processing /Users/wiesner/src/LISA/constants
DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
Building wheels for collected packages: lisaconstants
Building wheel for lisaconstants (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Applications/Xcode.app/Contents/Developer/usr/bin/python3 -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘“’”‘/private/var/folders/xn/twxkv5s10kzgy2757x83p4g40000gn/T/pip-req-build-ogy5p713/setup.py’“‘”’; __file__=‘“’”‘/private/var/folders/xn/twxkv5s10kzgy2757x83p4g40000gn/T/pip-req-build-ogy5p713/setup.py’“‘”’;f = getattr(tokenize, ‘“’”‘open’“‘”’, open)(__file__) if os.path.exists(__file__) else io.StringIO(‘“’”‘from setuptools import setup; setup()‘“’”‘);code = f.read().replace(‘“’”‘\r\n’“‘”’, ‘“’”‘\n’“‘”’);f.close();exec(compile(code, __file__, ‘“’”‘exec’“‘”’))' bdist_wheel -d /private/var/folders/xn/twxkv5s10kzgy2757x83p4g40000gn/T/pip-wheel-3ow624nd
cwd: /private/var/folders/xn/twxkv5s10kzgy2757x83p4g40000gn/T/pip-req-build-ogy5p713/
Complete output (33 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/lisaconstants
copying lisaconstants/cheader.py -> build/lib/lisaconstants
copying lisaconstants/constants.py -> build/lib/lisaconstants
copying lisaconstants/__init__.py -> build/lib/lisaconstants
copying lisaconstants/meta.py -> build/lib/lisaconstants
installing to build/bdist.macosx-10.14.6-x86_64/wheel
running install
running install_lib
creating build/bdist.macosx-10.14.6-x86_64
creating build/bdist.macosx-10.14.6-x86_64/wheel
creating build/bdist.macosx-10.14.6-x86_64/wheel/lisaconstants
copying build/lib/lisaconstants/cheader.py -> build/bdist.macosx-10.14.6-x86_64/wheel/lisaconstants
copying build/lib/lisaconstants/constants.py -> build/bdist.macosx-10.14.6-x86_64/wheel/lisaconstants
copying build/lib/lisaconstants/__init__.py -> build/bdist.macosx-10.14.6-x86_64/wheel/lisaconstants
copying build/lib/lisaconstants/meta.py -> build/bdist.macosx-10.14.6-x86_64/wheel/lisaconstants
running install_egg_info
running egg_info
creating lisaconstants.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
writing manifest file ‘lisaconstants.egg-info/SOURCES.txt’
reading manifest file ‘lisaconstants.egg-info/SOURCES.txt’
writing manifest file ‘lisaconstants.egg-info/SOURCES.txt’
Copying lisaconstants.egg-info to build/bdist.macosx-10.14.6-x86_64/wheel/lisaconstants-1.0-py3.8.egg-info
running install_scripts
installing C++ header file -> /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/lisaconstants.hpp
error: [Errno 13] Permission denied: ‘/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/lisaconstants.hpp’
----------------------------------------
ERROR: Failed building wheel for lisaconstants
Running setup.py clean for lisaconstants
Failed to build lisaconstants
Installing collected packages: lisaconstants
Running setup.py install for lisaconstants ... error
ERROR: Command errored out with exit status 1:
command: /Applications/Xcode.app/Contents/Developer/usr/bin/python3 -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘“’”‘/private/var/folders/xn/twxkv5s10kzgy2757x83p4g40000gn/T/pip-req-build-ogy5p713/setup.py’“‘”’; __file__=‘“’”‘/private/var/folders/xn/twxkv5s10kzgy2757x83p4g40000gn/T/pip-req-build-ogy5p713/setup.py’“‘”’;f = getattr(tokenize, ‘“’”‘open’“‘”’, open)(__file__) if os.path.exists(__file__) else io.StringIO(‘“’”‘from setuptools import setup; setup()‘“’”‘);code = f.read().replace(‘“’”‘\r\n’“‘”’, ‘“’”‘\n’“‘”’);f.close();exec(compile(code, __file__, ‘“’”‘exec’“‘”’))' install --record /private/var/folders/xn/twxkv5s10kzgy2757x83p4g40000gn/T/pip-record-grsqqw1n/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/wiesner/Library/Python/3.8/include/python3.8/lisaconstants
cwd: /private/var/folders/xn/twxkv5s10kzgy2757x83p4g40000gn/T/pip-req-build-ogy5p713/
Complete output (32 lines):
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/lisaconstants
copying lisaconstants/cheader.py -> build/lib/lisaconstants
copying lisaconstants/constants.py -> build/lib/lisaconstants
copying lisaconstants/__init__.py -> build/lib/lisaconstants
copying lisaconstants/meta.py -> build/lib/lisaconstants
running install_lib
creating /Users/wiesner/Library/Python/3.8/lib/python/site-packages/lisaconstants
copying build/lib/lisaconstants/cheader.py -> /Users/wiesner/Library/Python/3.8/lib/python/site-packages/lisaconstants
copying build/lib/lisaconstants/constants.py -> /Users/wiesner/Library/Python/3.8/lib/python/site-packages/lisaconstants
copying build/lib/lisaconstants/__init__.py -> /Users/wiesner/Library/Python/3.8/lib/python/site-packages/lisaconstants
copying build/lib/lisaconstants/meta.py -> /Users/wiesner/Library/Python/3.8/lib/python/site-packages/lisaconstants
byte-compiling /Users/wiesner/Library/Python/3.8/lib/python/site-packages/lisaconstants/cheader.py to cheader.cpython-38.pyc
byte-compiling /Users/wiesner/Library/Python/3.8/lib/python/site-packages/lisaconstants/constants.py to constants.cpython-38.pyc
byte-compiling /Users/wiesner/Library/Python/3.8/lib/python/site-packages/lisaconstants/__init__.py to __init__.cpython-38.pyc
byte-compiling /Users/wiesner/Library/Python/3.8/lib/python/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 /Users/wiesner/Library/Python/3.8/lib/python/site-packages/lisaconstants-1.0-py3.8.egg-info
running install_scripts
writing list of installed files to ‘/private/var/folders/xn/twxkv5s10kzgy2757x83p4g40000gn/T/pip-record-grsqqw1n/install-record.txt’
installing C++ header file -> /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/lisaconstants.hpp
error: [Errno 13] Permission denied: ‘/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/lisaconstants.hpp’
----------------------------------------
ERROR: Command errored out with exit status 1: /Applications/Xcode.app/Contents/Developer/usr/bin/python3 -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘“’”‘/private/var/folders/xn/twxkv5s10kzgy2757x83p4g40000gn/T/pip-req-build-ogy5p713/setup.py’“‘”’; __file__=‘“’”‘/private/var/folders/xn/twxkv5s10kzgy2757x83p4g40000gn/T/pip-req-build-ogy5p713/setup.py’“‘”’;f = getattr(tokenize, ‘“’”‘open’“‘”’, open)(__file__) if os.path.exists(__file__) else io.StringIO(‘“’”‘from setuptools import setup; setup()‘“’”‘);code = f.read().replace(‘“’”‘\r\n’“‘”’, ‘“’”‘\n’“‘”’);f.close();exec(compile(code, __file__, ‘“’”‘exec’“‘”’))' install --record /private/var/folders/xn/twxkv5s10kzgy2757x83p4g40000gn/T/pip-record-grsqqw1n/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/wiesner/Library/Python/3.8/include/python3.8/lisaconstants Check the logs for full command output.
Edited by Jean-Baptiste Bayle