skip to Main Content

Plesk on the MediaTemple DV servers uses Python 2.4 for stuff, so the 2.4 install can’t be replaced but someone recommended installing a separate python 2.7 install since my app runs on that. I’m new to the whole server thing, so this is new territory. My sense is that I can create a new directory for the source files and use SSH to download the files to said directory and then cd into it and install python 2.7. Then I have to figure out how to make sure Apache knows to use Python 2.7 to run the django app in question. Does this sound correct?

2

Answers


  1. Chosen as BEST ANSWER

    Never mind, sorted it. the important thing seemed to be to edit the etc/ld.so.conf by adding usr/local/lib, then running sbin/ldconfig, which then makes ld.so.conf look like:

    include ld.so.conf.d/*.conf
    /usr/local/lib
    

    Donwload and then compile Python

    and use make && make altinstall.


  2. Unless you can make a system wide change to your python installation, you would have to run Apache, python and Django in the same virtual environment. If it is not possible, use gunicorn (instead of apache) to run the Django app in a virtualenv (in a port different from Apache’s). If this app runs in a subdomain, you should consider hosting the Django app in a PAAS (Heroku, Google App Engine, etc.) which allow you to easily switch running environments.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search