Hi, I wonder if someone can help me with some virtualenv and pip issues.
I am on Ubuntu 10.04 and I have successfully set up virtualenv with pip.
How do I know I was successful?
I can activate and deactivate a specific virtual environment I have created, and I have used yolk to check what is installed in my virtualenv. I have installed Django in my virtualenv (tested by importing django from the python interpreter in the virtual env).
But, I have encountered two problems:
1. pip freeze
I try to build a requirements file with sudo pip freeze > filename.txt and no matter what, it tells me permission is denied for filename.txt. I have created other files in the virtualenv using touch with success - The problem is just with freeze and even though I use sudo I still get permission denied.
2. Running Django as WSGI
I have successfully checked that WSGI is configured correctly for apache (by running a simple hello world wsgi application in a public folder). However, I get 500 errors when I try to run my Django project from my wsgi file.
My wsgi file is here:
/path/to/public/application.wsgi
I have my WSGI script alias set up correctly in the virtual host file for the domain (that is how I tested WSGI before I tried to run Django)
Here is my wsgi file for the django project:
import os
import sys
import site
site.addsitedir('/path/to/virtenv_1/lib/python2.6/site-packages')
os.environ['DJANGO_SETTINGS_MODULE'] = 'project_name.settings'
sys.path.append('/path/to/public')
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
According to several sources, my file appears fine. Yet, Internal Server Error when this file is used.
Any ideas?
Thanks.