安装指定版本django(等号不留空)
pip install django==1.6.1
pip安装crispy-forms:
pip install --upgrade django-crispy-forms
没有MySQLdb:(我个人觉得这东西安装成功有时还得看运气……果然学识尚浅)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb:
pip install MySQL-python
or
sudo apt-get install python-mysqldb
若还出现:EnvironmentError: mysql_config not found
则:
<pre name="code" class="python">sudo apt-get install libmysqlclient-dev
若出现以下:
_mysql.c:29:20: fatal error: Python.h: No such file or directory #include "Python.h" ^compilation terminated.error: command 'x86_64-linux-gnu-gcc' failed with exit status 1则尝试:
sudo apt-get install python-dev
ImportError: No module named xadmin:
pip install django-xadmin
安装django-restful框架:
从网站下载源文件解压缩http://pypi.python.org/pypi/djangorestframework/0.3.2
sudo python setup.py install
安装mysql数据库:
sudo apt-get install mysql-server
与MicrosoftSqlServer数据库有关的安装包有安装顺序:
1.six
2.lxml
3.pyOpenSSL
4.pymssql
5.pyodbc
6.django-pymssql
7.django-pyodbc
8.django-pyodbc-azure
当出现:Unable to install ‘xxx’ in python2.7 package时:
尝试使用sudo apt-get install 替换 pip
sudo apt-get update 更新你当前的包
Ubuntu上使用:
sudo apt-get install unixodbc-dev
即可pip install pyodbc