Tuesday, June 24, 2014

How to update twisted Python

Source: http://stackoverflow.com/questions/1117255/how-to-update-the-twisted-framework


Try using virtualenv and pip (sudo easy_install virtualenv pip), which are great ways to avoid the dependency hell that you are experiencing.
With virtualenv you can create isolated Python environments, and then using pip you can directly install new packages into you virtualenvs.
Here is a complete example:

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__"
My Mac does not have -E option for pip. So I just run $ pip install -U twisted

No comments: