Can somebody recommend a way to install django with virtualenv and mod_wsgi 3.4/ python 3.3 ? asked 27 Dec '13, 11:14 xpostudio4 |
You just need to create a mod_wsgi3.4/python3.3 application to get your apache instance. Then in the httpd.conf, you just need to update the python-path to include your virtualenv as well as update the WSGIScriptAlias to point to your wsgi file for your project. answered 27 Dec '13, 11:40 bmeyer71 ♦♦ |
I tried to install django with mod_wsgi 3.4, python 3.4 and the new venv module included in python 3.3 but i'm having permission problems: PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.4/site-packages/django' I created a ticket to Webfaction staff but they haven't gave me a solution. These were the steps I did to configure the venv module.
They told me this: The directory /usr/local/lib/python3.4/site-packages/django does not exist on our servers. You will need to change the installer to use /home/divxpr/lib/python3.4/site-packages/django instead. How i do this? I asked them but i'm afraid they don't know how to do this. Thanks, Iván (Sorry for the I-centrism) answered 15 Jun '14, 08:06 Ivan Rivera I found a solution for this at this page: https://community.webfaction.com/questions/4253/simple-virtualenv-usage-with-django The problem was that the version of pip i was running is the 1.5.4 (pip -V) and for all the packages installed with pip 1.5 version or greater you need to append --no-use-wheel like this: pip3.3 install django --no-use-wheel
(15 Jun '14, 08:53)
Ivan Rivera
Pip, executed within an activated virtualenv, shouldn't need the --no-use-wheel option. Pip is also not installed by default when a virtualenv is created. If you didn't install pip after enabling the virtual environment, then chances are you are using a different pip executable that uses the default python interpreter instead of the one in your venv, hence the mix up.
(15 Jun '14, 11:37)
iliasr ♦♦
You are right, i haven't enable pip in the active environment since i thought pip is installed automatic with Python 3.4. Do you know how to install PIP into a venv? i runned easy_install pip but the general pip executable is installed.
(16 Jun '14, 06:15)
Ivan Rivera
With your venv activated, use wget to fetch https://bootstrap.pypa.io/get-pip.py and then run UPDATE: According to the documentation python 3.4 based venvs install pip by default. Python 3.3 ones, still need to manually have it installed.
(16 Jun '14, 16:43)
iliasr ♦♦
|