[Twisted-Python] multiple versions of twisted on same machine
![](https://secure.gravatar.com/avatar/b7de5ef8a93799c6e6dead3900261c15.jpg?s=120&d=mm&r=g)
Hi, I'd like to upgrade twisted to the newest version and obviously first test if my application works fine with new version. What is the best (safest) way to do it? Thanks for help, Pet
![](https://secure.gravatar.com/avatar/ee5a0c3572e83c87f7f4b6dc11770520.jpg?s=120&d=mm&r=g)
You could try virtualenv: http://pypi.python.org/pypi/virtualenv And have one virtual environment with Twisted 9.0 and another with Twisted 8.2, etc, etc. --matt On Thu, Feb 11, 2010 at 6:41 AM, Pet <petshmidt@googlemail.com> wrote:
![](https://secure.gravatar.com/avatar/fcdfff68a2c9b2d1d199e4626998c791.jpg?s=120&d=mm&r=g)
FYI, this totally fails on Windows XP, Py2.6, Twisted 9.0.0... [command line oputput] (venv) C:\Documents and Settings\hornk\Desktop\twisted_venv_test\venv>easy_install Twisted Searching for Twisted Reading http://pypi.python.org/simple/Twisted/ Reading http://twistedmatrix.com/ Reading http://www.twistedmatrix.com Reading http://twistedmatrix.com/products/download Reading http://twistedmatrix.com/projects/core/ Best match: Twisted 9.0.0 Downloading http://tmrc.mit.edu/mirror/twisted/Twisted/9.0/Twisted-9.0.0.win32-py2.6.exe Processing Twisted-9.0.0.win32-py2.6.exe error: c:\docume~1\hornk\locals~1\temp\easy_install-ftwcae\Twisted-9.0.0.win32-py2.6.exe is not a valid distutils Windows .exe [end command line output] Am I missing something or should I file a ticket for this? Kevin Horn On Thu, Feb 11, 2010 at 6:55 AM, Matt Bone <thatmattbone@gmail.com> wrote:
![](https://secure.gravatar.com/avatar/607cfd4a5b41fe6c886c978128b9c03e.jpg?s=120&d=mm&r=g)
On 04:41 pm, kevin.horn@gmail.com wrote:
FYI, this totally fails on Windows XP, Py2.6, Twisted 9.0.0...
This is an interesting problem. easy_install identifies http://tmrc.mit.edu/mirror/twisted/Twisted/9.0/Twisted-9.0.0.win32-py2.6.exe as some kind of package it can install - maybe a self-extracting zip? I don't know - but that's not what it is. This seems to be because the name matches the scheme setuptools uses for naming certain kinds of distribution files. We presently are not distributing binary eggs for Windows, so easy_install isn't likely to be the best installation strategy anyway. Jean-Paul
![](https://secure.gravatar.com/avatar/fcdfff68a2c9b2d1d199e4626998c791.jpg?s=120&d=mm&r=g)
On Thu, Feb 11, 2010 at 11:05 AM, <exarkun@twistedmatrix.com> wrote:
I think it thinks that it's an executable created using "python setup.py bdist_wininst" or something similar...
We presently are not distributing binary eggs for Windows, so easy_install isn't likely to be the best installation strategy anyway.
Well, the second thing I do on a new machine (after installing Python of course) is install MinGW and set distutils up to use it as a compiler for Python extensions, so for me it usually works just fine. :) However, in the general case, I agree that most people won't necessarily have a compiler installed on Windows. Not entirely related to this discussion (though not entirely unrelated), I think that Twisted's whole release/distribution system needs to be revamped a little. I've been meaning to talk to radix about this, but haven't found the time...maybe this will give me the kick in the pants I needed... Kevin Horn
![](https://secure.gravatar.com/avatar/152986af8e990c9c8b61115f298b9cb2.jpg?s=120&d=mm&r=g)
On Thu, 11 Feb 2010 11:54:47 -0600 Kevin Horn <kevin.horn@gmail.com> wrote:
Oh ho ho ho ho, boy. As one who has tinkered with Twisted's release/distribution system (unsuccessfully so far - see ticket 1696 and 4138), I'd be very interested to hear what you propose. Oh, you might also be interested in ticket 1533.
![](https://secure.gravatar.com/avatar/b7de5ef8a93799c6e6dead3900261c15.jpg?s=120&d=mm&r=g)
On Sat, Feb 13, 2010 at 6:05 AM, Glyph Lefkowitz <glyph@twistedmatrix.com> wrote:
Hi, I can't install Twisted in VirtualEnv. Can someone explain what is wrong, please? Thanks! (newtwisted)hostname:/usr/local/development/newtwisted/bin# easy_install Twisted Searching for Twisted Reading http://pypi.python.org/simple/Twisted/ Reading http://www.twistedmatrix.com Reading http://twistedmatrix.com/products/download Reading http://twistedmatrix.com/projects/core/ Reading http://twistedmatrix.com/ Reading http://tmrc.mit.edu/mirror/twisted/Twisted/8.2/ Reading http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/ Reading http://tmrc.mit.edu/mirror/twisted/Twisted/10.0/ Reading http://tmrc.mit.edu/mirror/twisted/Twisted/9.0/ Best match: Twisted 10.0.0 Downloading http://tmrc.mit.edu/mirror/twisted/Twisted/10.0/Twisted-10.0.0.tar.bz2 Processing Twisted-10.0.0.tar.bz2 Running Twisted-10.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-9n_UrX/Twisted-10.0.0/egg-dist-tmp-dt-vez twisted/runner/portmap.c:10:20: error: Python.h: No such file or directory twisted/runner/portmap.c:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token twisted/runner/portmap.c:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token twisted/runner/portmap.c:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PortmapMethods’ twisted/runner/portmap.c: In function ‘initportmap’: twisted/runner/portmap.c:55: warning: implicit declaration of function ‘Py_InitModule’ twisted/runner/portmap.c:55: error: ‘PortmapMethods’ undeclared (first use in this function) twisted/runner/portmap.c:55: error: (Each undeclared identifier is reported only once twisted/runner/portmap.c:55: error: for each function it appears in.) error: Setup script exited with error: command 'gcc' failed with exit status 1
![](https://secure.gravatar.com/avatar/ee5a0c3572e83c87f7f4b6dc11770520.jpg?s=120&d=mm&r=g)
You could try virtualenv: http://pypi.python.org/pypi/virtualenv And have one virtual environment with Twisted 9.0 and another with Twisted 8.2, etc, etc. --matt On Thu, Feb 11, 2010 at 6:41 AM, Pet <petshmidt@googlemail.com> wrote:
![](https://secure.gravatar.com/avatar/fcdfff68a2c9b2d1d199e4626998c791.jpg?s=120&d=mm&r=g)
FYI, this totally fails on Windows XP, Py2.6, Twisted 9.0.0... [command line oputput] (venv) C:\Documents and Settings\hornk\Desktop\twisted_venv_test\venv>easy_install Twisted Searching for Twisted Reading http://pypi.python.org/simple/Twisted/ Reading http://twistedmatrix.com/ Reading http://www.twistedmatrix.com Reading http://twistedmatrix.com/products/download Reading http://twistedmatrix.com/projects/core/ Best match: Twisted 9.0.0 Downloading http://tmrc.mit.edu/mirror/twisted/Twisted/9.0/Twisted-9.0.0.win32-py2.6.exe Processing Twisted-9.0.0.win32-py2.6.exe error: c:\docume~1\hornk\locals~1\temp\easy_install-ftwcae\Twisted-9.0.0.win32-py2.6.exe is not a valid distutils Windows .exe [end command line output] Am I missing something or should I file a ticket for this? Kevin Horn On Thu, Feb 11, 2010 at 6:55 AM, Matt Bone <thatmattbone@gmail.com> wrote:
![](https://secure.gravatar.com/avatar/607cfd4a5b41fe6c886c978128b9c03e.jpg?s=120&d=mm&r=g)
On 04:41 pm, kevin.horn@gmail.com wrote:
FYI, this totally fails on Windows XP, Py2.6, Twisted 9.0.0...
This is an interesting problem. easy_install identifies http://tmrc.mit.edu/mirror/twisted/Twisted/9.0/Twisted-9.0.0.win32-py2.6.exe as some kind of package it can install - maybe a self-extracting zip? I don't know - but that's not what it is. This seems to be because the name matches the scheme setuptools uses for naming certain kinds of distribution files. We presently are not distributing binary eggs for Windows, so easy_install isn't likely to be the best installation strategy anyway. Jean-Paul
![](https://secure.gravatar.com/avatar/fcdfff68a2c9b2d1d199e4626998c791.jpg?s=120&d=mm&r=g)
On Thu, Feb 11, 2010 at 11:05 AM, <exarkun@twistedmatrix.com> wrote:
I think it thinks that it's an executable created using "python setup.py bdist_wininst" or something similar...
We presently are not distributing binary eggs for Windows, so easy_install isn't likely to be the best installation strategy anyway.
Well, the second thing I do on a new machine (after installing Python of course) is install MinGW and set distutils up to use it as a compiler for Python extensions, so for me it usually works just fine. :) However, in the general case, I agree that most people won't necessarily have a compiler installed on Windows. Not entirely related to this discussion (though not entirely unrelated), I think that Twisted's whole release/distribution system needs to be revamped a little. I've been meaning to talk to radix about this, but haven't found the time...maybe this will give me the kick in the pants I needed... Kevin Horn
![](https://secure.gravatar.com/avatar/152986af8e990c9c8b61115f298b9cb2.jpg?s=120&d=mm&r=g)
On Thu, 11 Feb 2010 11:54:47 -0600 Kevin Horn <kevin.horn@gmail.com> wrote:
Oh ho ho ho ho, boy. As one who has tinkered with Twisted's release/distribution system (unsuccessfully so far - see ticket 1696 and 4138), I'd be very interested to hear what you propose. Oh, you might also be interested in ticket 1533.
![](https://secure.gravatar.com/avatar/b7de5ef8a93799c6e6dead3900261c15.jpg?s=120&d=mm&r=g)
On Sat, Feb 13, 2010 at 6:05 AM, Glyph Lefkowitz <glyph@twistedmatrix.com> wrote:
Hi, I can't install Twisted in VirtualEnv. Can someone explain what is wrong, please? Thanks! (newtwisted)hostname:/usr/local/development/newtwisted/bin# easy_install Twisted Searching for Twisted Reading http://pypi.python.org/simple/Twisted/ Reading http://www.twistedmatrix.com Reading http://twistedmatrix.com/products/download Reading http://twistedmatrix.com/projects/core/ Reading http://twistedmatrix.com/ Reading http://tmrc.mit.edu/mirror/twisted/Twisted/8.2/ Reading http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/ Reading http://tmrc.mit.edu/mirror/twisted/Twisted/10.0/ Reading http://tmrc.mit.edu/mirror/twisted/Twisted/9.0/ Best match: Twisted 10.0.0 Downloading http://tmrc.mit.edu/mirror/twisted/Twisted/10.0/Twisted-10.0.0.tar.bz2 Processing Twisted-10.0.0.tar.bz2 Running Twisted-10.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-9n_UrX/Twisted-10.0.0/egg-dist-tmp-dt-vez twisted/runner/portmap.c:10:20: error: Python.h: No such file or directory twisted/runner/portmap.c:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token twisted/runner/portmap.c:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token twisted/runner/portmap.c:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PortmapMethods’ twisted/runner/portmap.c: In function ‘initportmap’: twisted/runner/portmap.c:55: warning: implicit declaration of function ‘Py_InitModule’ twisted/runner/portmap.c:55: error: ‘PortmapMethods’ undeclared (first use in this function) twisted/runner/portmap.c:55: error: (Each undeclared identifier is reported only once twisted/runner/portmap.c:55: error: for each function it appears in.) error: Setup script exited with error: command 'gcc' failed with exit status 1
participants (6)
-
exarkun@twistedmatrix.com
-
Glyph Lefkowitz
-
Kevin Horn
-
Matt Bone
-
Pet
-
Timothy Allen