Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#4499 defect closed fixed (fixed)

`easy_install Twisted` fails in a virtualenv on Win32 (using mingw)

Reported by: khorn Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:
Author: Launchpad Bug:


steps to reproduce:

  1. create a virtualenv on Win32, cd into it, and activate it
  2. run easy_install Twisted

here's what I get:

(venv) venv>easy_install Twisted
Searching for Twisted
Best match: Twisted 10.0.0
Processing Twisted-10.0.0.tar.bz2
Running Twisted-10.0.0\ -q bdist_egg --dist-dir c:\docume~1\funsize\loca
error: Setup script exited with error: Unable to find vcvarsall.bat

This is on WinXP, with distutils configured to use mingw as the compiler to use to build extensions.

easy_install Twisted works fine outside of a virtualenv

Change History (9)

comment:1 follow-up: Changed 4 years ago by exarkun

Does easy_install in virtualenv work for any source package including extension modules?

comment:2 Changed 4 years ago by khorn

Also, I should mention, easy_install Twisted appears to work fine in a virtualenv on Ubuntu 9.10 (and presumably other Unices).

My testing so far has been with Python 2.6.4 and Twisted 10.0

comment:3 in reply to: ↑ 1 Changed 4 years ago by khorn

Replying to exarkun:

Does easy_install in virtualenv work for any source package including extension modules?

Hmmm...good question. If not, I guess this could be a distutil/setuptools/virtualenv problem, not a Twisted one. I'll investigate.

comment:4 Changed 4 years ago by exarkun

Cool. Thanks for looking into it. I've just remembered that as of the 10.1 release, we're going to try to make a bdist_wininst available. I think this should remove the need to have a compiler available at easy_install time. So that might be another way we can resolve this behavior.

comment:5 Changed 4 years ago by khorn

Just tried installing lxml inside a virtualenv, and got the same error. So this doesn't seem to be a Twisted-specific problem after all.

comment:6 Changed 4 years ago by khorn

It looks as though virtualenv creates a new (empty) distutils.cfg, which results in distutils trying to use the default of MSVC. I'm not sure whether this behavior is by design or not.

easy_install Twisted completes once you fix the config file.

Regardless, once Twisted has a distutils-compatible .exe file this will become pretty much a non-issue.

Suggest this be closed when said .exe installer becomes available. Or now. Whichever.

comment:7 Changed 4 years ago by exarkun

  • Resolution set to fixed
  • Status changed from new to closed

It should magically happen as part of the release. has trunk versions until then. The release procedure also mentions that the .exes should be uploaded to pypi and such. So, even though the described behavior is still what happens, I don't think we need to leave this ticket open to track the fix; closing it would just be one more step for the release manager. :)

comment:8 Changed 4 years ago by zooko

See also #3586 (I want to install twisted without a c compiler). If #3586 were fixed then I guess the build in the virtualenv would have succeeded despite the problem with the compiler.

comment:9 Changed 3 years ago by <automation>

  • Owner glyph deleted
Note: See TracTickets for help on using tickets.