WebFaction
Community site: login faq

I have used the instructions here (http://docs.webfaction.com/software/python.html#installing-packages-with-pip) to install with pip-2.7. I have a django app running just fine. However, I recently added a new user who tried to run manage.py shell and got the error "cannot import social_auth". We looked and I think social_auth is installed in my root under home/usr/lib/python2.7. Also, it does NOT appear to be in home/usr/webapps/django_app/lib/python2.7/. Moreover, if I do this (https://community.webfaction.com/questions/13605/using-pip-inside-the-webapp-dir), it shows that I have social_auth installed.

So, I'm thinking its installed in my root, not in the webapp folder and my new user doesn't have access to my root so it doesn't import for him (but the website is working and the shell works for me)? I tried running pip again to install that package to the webapp directory but it says requirement already exists and references my home/usr/lib/python2.7.

Anyone know why this would happen? Or why my webapp would pull packages from my root (if that's even what's going on?)

asked 28 Jan '14, 18:08

rsp
141612
accept rate: 0%


A separate SSH user would not (should not, unless you explicitly granted permission) have write permission on your $HOME/lib/python2.7 directory. So, it generally would not be possible for a separate SSH user to use pip to install the package into that location.

It's more likely that your webapp is pulling packages from your account-wide python libraries in $HOME/lib/python2.7. That's typical as long as that path is on the python path, which you can probably see in your httpd.conf file. Editing the python path there can allow you to remove this directory from the search path if you prefer.

Hope that helps!

permanent link

answered 29 Jan '14, 02:29

ryans ♦♦
5.0k93360
accept rate: 43%

edited 29 Jan '14, 02:29

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×337
×54
×24

question asked: 28 Jan '14, 18:08

question was seen: 1,910 times

last updated: 29 Jan '14, 02:29

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM