Go to advanced search

by codysman
Mon Mar 09, 2020 1:43 am
Forum: Python
Topic: trouble running python script with sudo [obsolete]
Replies: 9
Views: 6550

Re: trouble running python script with sudo

IanH2 wrote:
Sat Oct 12, 2013 4:22 pm
It looks like the 'pi' user has a different PYTHONPATH environment variable setting to the root user.

You're right - if you installed the packages for `pi` user they are not available for `sudo` user and vice-versa.
To solve the problem just do: `sudo su` and reinstall the problematic package.

Go to advanced search