I have developed a project with Django framework(python and mysql DB) in Linux OS(Ubuntu 12.04), I want to run this project in localhost in another machine with Linux(Ubuntu 12.04) without installing Django here, is it possible run a django project without django installation. Is there any way to run so?
Thanks in advance.
In order to be able to use regular Django, it has to be installed since you have to be able to do import django
. However it is never a good idea to install Django as a system-level Python package. It is always best to work with virtualenvs. They allows you to work on multiple projects where each project might require different packages to be installed, and different projects might require to use different version of the same package. In addition to being used development, virtualenvs are very useful to install packages on remote machines even if you do not have root privileged.
All you have to do is download virtualenv.py and then do the following on the remote machine:
$ wget https://raw.github.com/pypa/virtualenv/master/virtualenv.py
$ python virtualenv.py venv
$ cd venv
$ source bin/activate
$ pip install django
That will create a virtualenv, into which you can install any Python packages without a need for root privileges. More about virtualenv here.
You can try DjangoOnAStick or portablepython. Both don't require an installation to work. You can also try PyRun it's a One file Python Runtime that also doesn't need installation you can watch a video about it by the creator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With