简体   繁体   中英

Making python libraries installed as root accessible by other non-root users

I'm not a sys admin guy, but I am tasked (due to budget limitations) to set up a VM server for a web app. I did my best to figure most things out, but when I try to install Python modules as root, I cannot use them in other non-root accounts that I created.

For example, I installed Twilio python library as root. But when I log in as "userjoe" and try to run a sample script using twilio, it doesn't work.

What should I do to make libraries installed as root accessible by non-root users? Thank you.

ps I'm tagging this post as "python" and a few other in case someone from that community knows the answer. Please let me know if my tags are irrelevant.

如果Python模块仅由一个用户使用,则可以使用该用户(userjoe)登录并使用PIP的--user参数将其安装到用户的主目录中:

pip install twilio --user

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM