Reputation: 1377
I'm currently hosting with a dreamhost shared VPS. I do not have sudo rights. I want to install django packages but I cannot to /usr/local/lib/python2.7/dist-packages/
because python is root access only. I have setup a directory in my user directory also called dist-packages
to which I have copied all my packages to. I want to use the packages in the dist-packages
directory I created to build my django app. Is possible to use my packages? I'm looking for a work around. I do have virtual python env installed, is there a way to use it maybe?
Python 2.7 Django 1.9
My current setup
/home/myuser/mydomain.com/
env/
myApp/
passenger_wsgi.py
public/
How do I setup the env?
Upvotes: 1
Views: 349
Reputation: 25539
You should be using virtualenv
for sure(I'm surprised that you are still looking for a work around). It's really inconvenient to use default python for everything. virtualenv
will create an isolated python directory of your choice and install everything in there. When you want to use it, just "activate" it then you are automagically in that python environment.
It's almost trivial to learn how to create one, you can even create as many as you like, each with different packages installed. Check their doc for more details.
Upvotes: 1