环境:
fedora22,openjdk8
安装eclipse
yum install eclipse
安装egit插件(根据需要安装)
http://download.eclipse.org/egit/updates
安装pydev插件
http://pydev.org/updates
安装mysql
yum install community-mysql community-mysql-server
安装python
yum install python
更换python3版本:
Python3在官网上下载就可以了,安装完成后删除Fedora22自带的Python2.7链接,在终端输入命令:
rm /usr/bin/python
然后建立新连接:
ln -s /usr/bin/python3.4 /usr/bin/python
安装pip
yum install python-pip
安装django
pip install django==1.6.8(指定版本)
安装MySQL-python(Python连接MySQL模块)
yum install MySQL-python
安装python-devel
yum install python-devel
安装python-pillow(Python图片处理模块,根据需要安装)
yum install python-pillow
pillow是pil的分支。
需要安装pil的请看:
yum install gcc
yum install zlib zlib-devel
yum install libjpeg libjpeg-level
yum install freetype freetype-devel
yum install freetype python-devel
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/libjpeg.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/libz.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib/
sudo ln -s /usr/include/freetype2 /usr/include/freetype
(如果在/usr/linclude/下边儿有freetype文件而不是freetype2便可不用执行第4步骤)
下载:http://effbot.org/downloads/Imaging-1.1.7.tar.gz
wget "http://effbot.org/downloads/Imaging-1.1.7.tar.gz"
修改setup.py:
TCL_ROOT = "/usr/lib64/"
JPEG_ROOT = "/usr/lib64/"
ZLIB_ROOT = "/usr/lib64/"
TIFF_ROOT = "/usr/lib64/"
FREETYPE_ROOT = "/usr/lib64/"
LCMS_ROOT = "/usr/lib64/"
安装PIL:
python setup.py install
另有文章可供参考:
http://blog.csdn.net/werewolf_st/article/details/47186893
配置eclipse的python interperters
点击“快速自动配置”或“高级自动配置”即可。