Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

pip fails to install requirements because it tries to use the .cache owned by login user instead of the one owned by _snips-skills #186

Open
psiniemi opened this issue Aug 6, 2019 · 0 comments
Assignees
Labels
sub: sam Related to SAM sub: skill-server Related to the skill-server type: bug Not working as expected

Comments

@psiniemi
Copy link

psiniemi commented Aug 6, 2019

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

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

@cpoisson cpoisson added type: bug Not working as expected sub: sam Related to SAM labels Aug 7, 2019
@cpoisson cpoisson added the sub: skill-server Related to the skill-server label Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
sub: sam Related to SAM sub: skill-server Related to the skill-server type: bug Not working as expected
Projects
None yet
Development

No branches or pull requests

3 participants