Visa ett inlägg
Oläst 2012-05-15, 01:46 #5
wizzos avatar
wizzo wizzo är inte uppkopplad
Flitig postare
 
Reg.datum: Dec 2006
Inlägg: 424
wizzo wizzo är inte uppkopplad
Flitig postare
wizzos avatar
 
Reg.datum: Dec 2006
Inlägg: 424
Standard Python 2.5 eller högre + Virtualenv

Hej Kjette,

Skulle du kunna kolla med din kollega på driftavdelningen. Om det är möjligt att köra Python 2.5 eller högre hos Binero, för senaste Django (stable) 1.4 kräver minst Python 2.5.

Samt kan du även kolla med din kollega vilka möjligheter det finns för att låta era kunder köra Virtualenvironments med Python? Så att man själv kan kontrollera bättre vilka versioner av Python och Django som applikationerna körs i. Jag vet inte säkert ännu men det verkar som att Virtualenv kan göra så att man kan installera flera olika versioner av Python på samma system utan att röra default versionen som kom med distron.

http://jontourage.com/2011/02/09/virtualenv-pip-basics/
<quote>
Virtualenv, along with virtualenvwrapper and pip, make for a great way to completely isolate your development environment.

Also, a huge benefit is that it makes installing multiple versions of Python super easy without having to create any symlinks.
</quote>



Här är mina egna anteckningar som din kollega kan titta på för att testa vilka möjligheter det finns för att införa Virtualenv hos Binero, hoppas det hjälper och att det är genomförbart säkerhetsmässigt på shared hosting.
För jag fastnade på punkt 2 i och med att mitt konto hade begränsat med behörighet för att köra installationer.

##############################################
# Install virtualenv (pip is included)
##############################################
http://www.virtualenv.org/en/latest/index.html
https://wiki.archlinux.org/index.php/Python_VirtualEnv

1.)
$ mkdir ~/.virtualenvs


2.)
# Just grab the single file "virtualenv.py" and execute it.
# Depending on which python you call it seems that the ENV will inherit its version.
http://www.virtualenv.org/en/latest/index.html
$ python virtualenv.py ~/.virtualenvs/ENV1


3.)
# Activating the virtualenv.
$ source ~/.virtualenvs/ENV1/bin/activate


4.)
# Install some package inside the virtualenv like Django.
(ENV1)$ pip install django


5.)
(ENV1)$ python

>>> import django
>>> print django.get_version()
1.4


6.)
# Leave the virtualenv.
(ENV1)$ deactivate
wizzo är inte uppkopplad   Svara med citatSvara med citat