I have two users in my ubuntu : anubhav and ggc_user.
I installed a python module dlr using pip. When I switch to user anubhav and import dlr, I get expected output:
anubhav@Surface-Pro-3:/usr/bin$ python3
Python 3.7.5 (default, Nov 7 2019, 10:50:52)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dlr
CALL HOME FEATURE ENABLED
But when i switch to ggc_user using sudo -u ggc_user
, I get an error when I import dlr:
anubhav@Surface-Pro-3:/usr/bin$ sudo -u ggc_user bash
ggc_user@Surface-Pro-3:/usr/bin$ python3
Python 3.7.5 (default, Nov 7 2019, 10:50:52)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dlr
/usr/lib/python3/dist-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.26.3) or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)
How to make the module work for both users?