Reputation: 4125
I'm wish to install Numpy for the www-data
user, but I can not log into this user using login
. How can I make www-data
make us of the Numpy module?
To clarify. Numpy is available for root, and for my default user.
Upvotes: 6
Views: 10661
Reputation: 29
Another option would be to switch to that user and run it with
pip install --user package
There is that one issue (you probably ran into) that you cant switch to some users because some users have nologin shell
. But you can always switch to that user passing shell you want like this:
sudo su -s /usr/bin www-data
Upvotes: 0
Reputation: 894
Running pip
with sudo
should install a package for all users
sudo pip install numpy
If it doesn't work, try
sudo -H -u www-data pip install --user numpy
which should install numpy only for www-data
Upvotes: 5