Table of Contents
pip python
Virtual env
Install new env on the system (64 bit/32 bit)
User virtualenv and pip to avoid dependency problems.
$ yum install python2.6 python-setuptools python-imaging $ virtualenv mysite-env $ source mysite-env/bin/activate (env)$ pip install django==1.3.1 django-cms south (env)$ django-admin.py startproject mycmsproject
Packages Installation
Python Image Library
Starting project may issue error PIL (python image lib) not installed. Installing PIL requires python-devel to compile PIL:
$ sudo yum install python-devel (env)$ pip search PIL (env)$ pip install PIL
Replaced by Pillow
Install ext. image libs first:
sudo yum install libtiff-devel libjpeg-devel libzip-devel freetype-devel \ lcms2-devel libwebp-devel tcl-devel tk-devel pip install Pillow
Local installation
Install third-party app in current project:
(vfoss_env)[td@localhost vfoss_org]$ pip install --install-option="--install-purelib=$(pwd)" easy_thumbnails
Install lib locally from source. If a plugin is developed in other directory, it must be installed as a local app. Go to plugin source directory e.g. cmspluginnews. <code> # put dest-dir on PYTHONPATH otherwise there is error message. (vfossenv)[td@localhost vfossorg]$ export PYTHONPATH=/home/td/workspace/vfossorgpj/vfossorg/ ←- destdir (vfossenv)[td@localhost vfossorg]$ python setup.py install –install-purelib=dest_dir
</code>
Dump libs:
$ pip freeze>requirements.txt $ pip install -r requirements.txt
Remove Packages
Uninstall specific version.
pip install MySQL_python==1.2.2