我的ubuntu中有两个用户:anubhav和ggc_用户
我使用pip安装了一个python模块dlr。 当我切换到用户anubhav并导入dlr时,我得到了预期的输出:
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
但是,当我使用sudo -u ggc_user
切换到ggcāU用户时,我在导入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)
如何使模块同时适用于两个用户
你可以试试
system
arg相关问题 更多 >
编程相关推荐