Permalink
Fetching contributors…
Cannot retrieve contributors at this time
115 lines (80 sloc) 3.23 KB
To install on Ubuntu for development:
You need python 2.7+, but *not* python 3+
1. install pip globally:
http://www.pip-installer.org/en/latest/installing.html#prerequisites
May need to install easy_install first:
sudo apt-get install python-setuptools
Then install pip:
sudo easy_install pip
2. install virtualenv:
http://www.virtualenv.org/en/latest/index.html
sudo pip install virtualenv
3. (highly recommended but not necessary):
install virtualenvwrapper:
http://virtualenvwrapper.readthedocs.org/en/latest/
sudo pip install virtualenvwrapper
export WORKON_HOME=~/Envs
mkdir -p $WORKON_HOME
source /usr/local/bin/virtualenvwrapper.sh
Step 6 assumes virtualenvwrapper
4. unless you don't have it already: install git
sudo apt-get install git
5. We have had problems getting Pillow, one of the requirements,
to handle jpegs without installing some external libraries.
It's gone from requirements.txt until we figure this out more.
But you will need either Pillow or PIL, the Python Imaging Library.
See
http://pillow.readthedocs.org/en/latest/installation.html#simple-installation
for how to install Pillow on your operating system.
Note: Apostolis Xekoukoulotakis reports that on Debian, Pillow requires
libjpeg-dev and python2.7-dev.
Here's PIL: https://pypi.python.org/pypi/PIL/
http://askubuntu.com/questions/156484/how-do-i-install-python-imaging-library-pil
6. create a virtualenv (assuming you installed virtualenvwrapper):
mkvirtualenv vn --system-site-packages
workon vn
cdvirtualenv
7. clone the valuenetwork repo inside the vn virtualenv.
git clone https://github.com/valnet/valuenetwork.git
8. cd valuenetwork
9. pip install -r requirements.txt --trusted-host dist.pinaxproject.com
Note: if you get the pip error message, no such option: --trusted-host
do
pip install -U pip
10. pip install --no-deps easy_thumbnails
11. create the sqlite database
./manage.py syncdb
and then
./manage.py migrate
We've had some problems with easy_thumbnails migration.
If you do, create a local_settings.py file
in the same directory as settings.py and add:
SOUTH_MIGRATION_MODULES = {
'easy_thumbnails': 'easy_thumbnails.south_migrations',
}
12. do this to install some starter facets and patterns:
./manage.py loaddata ./fixtures/starters.json
And this to load some starter help:
./manage.py loaddata ./fixtures/help.json
13. run the tests
./manage.py test valueaccounting
14. crank up the django server
./manage.py runserver
15. point browser at http://127.0.0.1:8000/
16. You may also want a local_settings.py file
in the same directory as settings.py
You can look at local_settings_example.py for ideas,
but don't use it as-is. (It has two database sections.
You should keep only the sqlite one.)
17. When you log in for the first time, you must
create an EconomicAgent for yourself. Go into Admin,
which is on the pulldown menu by your username on the upper right.
Click on Economic agents, and then click on "add economic agent".
When you have added as much info as you want, go to the bottom
of the page, and select your username in the first User
select widget.
You will be the only user who will need to do this.
All other Agents and Users can be created from
the Organization page.
18. To be able to run scripts in shell_plus:
pip install ipython