Pip is run with simply sudo -u _snips-skill and the -H argument that would set the correct home is omitted and thus pip tries to use the login user's (pi) pip cache.
Use Cases Impacted
sam install assistant
How to reproduce
sam install assistant
Expected behavior
Requirements should be installed into the venv
Version and Environment
0.63.3 / Lubuntu 19.04
Logs
Running setup.sh & generating virtual environment for mossrock-snips
✖ Error setting up virtualenv, one or more actions might not be able to run. Reason :
WARNING: The directory '/home/pi/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/home/pi/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Additional information
Workaround
Add -H flag to /usr/local/lib/node_modules/snips-sam/lib/session/ssh.js where it runs the setup.sh
What's the issue?
Pip is run with simply
sudo -u _snips-skill
and the-H
argument that would set the correct home is omitted and thus pip tries to use the login user's (pi
) pip cache.Use Cases Impacted
sam install assistant
How to reproduce
sam install assistant
Expected behavior
Requirements should be installed into the venv
Version and Environment
0.63.3 / Lubuntu 19.04
Logs
Additional information
Workaround
Add
-H
flag to /usr/local/lib/node_modules/snips-sam/lib/session/ssh.js where it runs the setup.sh