如何更新扭曲的框架

Ant*_*ebb 3 python twisted

我可以从最新的8.2(差不多1200行代码)中看出,我错过了一些东西:http: //twistedmatrix.com/trac/browser/trunk/twisted/words/protocols/jabber/xmlstream.py

我的副本(3年前的697行)位于:/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/twisted/words/protocols/jabber/xmlstream.py

我运行了网站上发现的mac安装程序,所有看起来都安装得很好,但显然我缺少的东西:http: //twistedmatrix.com/trac/wiki/Downloads

有人能告诉我如何在我的Mac上正确更新扭曲?

cle*_*sha 17

尝试使用virtualenvpip(sudo easy_install virtualenv pip),这是避免你遇到的依赖地狱的好方法.

随着virtualenv你可以创建独立的Python环境,然后使用pip您可以直接安装新的软件包到你virtualenv秒.

这是一个完整的例子:


#create fresh virtualenv, void of old packages, and install latest Twisted
virtualenv --no-site-packages twisted_env
pip -E twisted_env install -U twisted

#now activate the virtualenv
cd twisted_env
source bin/activate

#test to see you have latest Twisted:
python -c "import twisted; print twisted.__version__"
Run Code Online (Sandbox Code Playgroud)