Urgh, I posted this in pypa/setuptools but it probably belongs here.
This confuses me a lot:
$ python3 -m pip install -U pip setuptools wheel cmake --user
Collecting pip ...
Collecting setuptools ...
Collecting wheel ...
Collecting cmake ...
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'setuptools'
As seen on Azure CI for Ubuntu 18.04. Why can't pip figure out to install setuptools first?
As a work-around, I install this now in two steps...
cmake
package and it does not declare its setuptools
dependency properly?
pip install onthefly
I get this message:Defaulting to user installation because normal site-packages is not writeable
.local
directory.
❯ sudo onthefly
sudo: onthefly: command not found
sudo
, I advise you to make it re-run itself with sudo
if it doesn't have root privileges
@agronholm I googled "re-running python script with sudo" to see if I could find some an example of what you mean. I found this stackoverflow question: https://stackoverflow.com/questions/5191878/change-to-sudo-user-within-a-python-script . Is that what you mean?
Use Tcl and Expect, plus subprocess to elevate yourself. So basica ...
pip install evdev
it gets installed in /usr/local/lib/python3.6/dist-packages
. Is there a way to configure this for example inside setup.py
?
pip install onthefly
it gets installed inside my home dir: /home/mroavi/.local/bin/onthefly
elevate
package a try, which seems to be designed exactly for the use-case I'm having now.