opkg install python-django
Make sure you have enough space on the Yun. http://myyafa.blogspot.be/2014/05/moving-linux-filesystem-openwrt-to-sd.html
I tried some methods that should work, but that didn't (see alternative-step2). What did work for me was:
- download Django to the Yun SD card. E.g. by:
-- downloading the tar.gz from https://www.djangoproject.com/download/ to the PC
-- mounting the Yun SD card on the PC: http://myyafa.blogspot.be/2013/11/mounting-yun-sd-card-on-my-linux.html and create a tmp dir in there.
-- copy Django-1.7.1.tar.gz to that directory
- ssh to the Yun, cd to the tar.gz file location and issue the commands:
gunzip Django-1.7.1.tar.gz tar -xvf Django-1.7.1.tar cd Django-1.7.1 python setup.py install
test the installation
issue the python command, then try importing django at the python prompt:
Python 2.7.3 (default, May 17 2014, 04:56:10)
[GCC 4.6.3 20120201 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
Note: you probably also need to install f(use opkg) ollowing packages before running a server:
To remove this manually installed (only then!) version: remove the directory inside site-packages found by:
python -c "import sys; sys.path = sys.path[1:]; import django; print(django.__path__)"
These should work, but they didnt for me:
opkg install distribute
opkg install python-openssl
pip install django
but for some reason, the process gets killed.
Also when putting the tar.gz on the Yun, and then
pip install Django-1.7.1.tar.gz
suffers from being killed