接触了Ruby,发现它有个包管理工具RubyGem非常好用,而且有非常完备的文档系统http://rdoc.info发现Python下也有相同的工具,包含easy_install和Pip。只是,我没有细看easy_install的方法,这就简单的介绍一下Pip的安装与使用:准备:$ curl -O ...
分类:
编程语言 时间:
2014-10-14 18:48:19
阅读次数:
208
今天,给一位新同事配置pip,用get-pip.py安装之后,出现错误:
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: pip==1.5.5
PIP就完全不能用了,后来请教了我们公司的python大牛,解决的办法很简单:
sudo eas...
分类:
编程语言 时间:
2014-10-14 17:14:43
阅读次数:
252
本文主要记录在搭建环境时遇到的问题及解决方案啊关于setuptools, pip, virtualenv,环境:win8.1+python2.7.61.setuptools:Easily download, build, install, upgrade, and uninstall Python ...
分类:
编程语言 时间:
2014-10-14 02:05:47
阅读次数:
357
在有外网访问权限的机器上使用 python 搭建 http 代理,供 pip 使用
分类:
编程语言 时间:
2014-10-12 23:25:38
阅读次数:
356
前提在开发过程中,经常需要使用各种第三方库,而且python又提供了pip,easy_install等工具来简化库的安装,所以很容易就会在系统python的site-packages目录中装满各种各样的库,但是这样在下面几种情况下会有问题:没有site-packages目录的写权限,比如共享主机不同...
分类:
其他好文 时间:
2014-10-12 23:20:58
阅读次数:
351
1.通过源代码安装Python3.4,make install时报错"Ignoring ensurepip failure: pip 1.5.4 requires SSL/TLS"。缺少openssl,openssl-devel(Ubuntu下为libssl-dev),通过yum -y instal...
分类:
编程语言 时间:
2014-10-12 18:58:08
阅读次数:
567
这个Utils用了第三方库DBUtils,我经过又一层了简单封装,自认为还是挺简洁的,只实现了增删改查
import MySQLdb,functools
from DBUtils.PooledDB import PooledDB
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
sys.path.append('../'...
分类:
数据库 时间:
2014-10-12 15:00:51
阅读次数:
755
1.安装flaskpip install flask2.安装geventpip install gevent3.安装gunicornpip install gunicorn版本信息例如以下:[root@rs-2 ~]# pip listFlask (0.10.1)gevent (1.0.1)gree...
分类:
其他好文 时间:
2014-10-12 11:02:38
阅读次数:
279
1最简单而又令人兴奋的命令: manage.py syncdb创建了指定app中的model相应的数据库表,假设是第一次使用此命令,会提示是否创建超级用户,输入username,Email和password,接着能够看到在创建索引:2. validate验证Model的正确性:manage.py v...
分类:
数据库 时间:
2014-10-11 23:12:26
阅读次数:
351
一、安装软件包并创建项目$sudo pip install django$sudo python -c "import django;print django.VERSION"(1, 7, 0, 'final', 0)$sudo django-admin startproject cmdb #创.....
分类:
系统相关 时间:
2014-10-10 23:53:24
阅读次数:
359