How to update twisted structure

I can see from the last 8.2 (almost 1200 lines of code) twisted that I'm missing something: http://twistedmatrix.com/trac/browser/trunk/twisted/words/protocols/jabber/xmlstream.py

My copy (697 lines from 3 years ago) is located at: /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/twisted/words/protocols/jabber/xmlstream.py

I ran the mac installer found on the website, everything looked like it was installed normally, but obviously something is missing for me: http://twistedmatrix.com/trac/wiki/Downloads

Can someone tell me how to update twisted correctly on my mac?

+3
source share
3 answers

Try using virtualenvand pip( sudo easy_install virtualenv pip), which are great ways to avoid the hell that you're experiencing.

With, virtualenvyou can create Python sandboxes, and then with, pipyou can directly install new virtualenvs packages in you .

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__"
+17
source

You can download this file that you specified by scrolling it down and click "Download in other formats"

Otherwise, just upgrade svn.

+1
source

: http://twistedmatrix.com/trac/wiki/FrequentlyAskedQuestions#WhyamIgettingImportErrorsforTwistedsubpackagesonOSX10.5

, .

:

: pico ~/.bash_profile : export PYTHONPATH = ~/Library/Python/2.5/site-packages/

, , , . (, )

+1
source

Source: https://habr.com/ru/post/1712430/