1. Deactivate the virtualenv if there is.
pyenv deactivate
2. Install the required libraries.
sudo apt-get install libpq-dev python-dev
3. Install PostgreSQL.
sudo apt-get install postgresql postgresql-contrib
1. Deactivate the virtualenv if there is.
pyenv deactivate
2. Install the required libraries.
sudo apt-get install libpq-dev python-dev
3. Install PostgreSQL.
sudo apt-get install postgresql postgresql-contrib
It took me one and an half day to get the Graphite working…
1. Make sure you have pyenv and pyenv-virtualenv installed.
2. Install the following packages.
sudo apt-get install python-dev pkg-config libcairo2-dev memcached
3. Install Python 2.7 with enable-shared.
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 2.7.8
Continue reading Install Graphite under pyenv virtualenv on Ubuntu
We have the Django welcome page working already.
I would like to create some REST services on that setup. We could make use of the Django REST framework.
Let’s keep working on our <project_root>/django_poc project to manage articles by REST. The example in this post are based on the Django REST framework quickstart tutorial. It’s good to go through all of them which could give you a more thorough idea on how the REST framework works.
1. Install the Django REST framework in your virtualenv.
pip install djangorestframework
Assume you have Python 2.7.8 and virtualenv installed on an Ubuntu. Refer to the following references if they are not yet ready.
1. Create a new virtualenv.
pyenv virtualenv 2.7.8 django-poc
Continue reading DJango – Installation and create a simple Django project
Last week we talked about managing multiple Pythons using pyenv.
But still we are lacking something like the Gemfile in Ruby for managing the version of those Python packages in a Python project. And here comes the Python virtualenv.
We can create different virtualenv on the same machine and each of them has its own Python binary, the pip package and the all other standard Python libraries needed to run the Python. In other words, each virtualenv acts like the Gemfile in a particular Python project.
Continue reading Manage your Python projects with virtualenv