[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Zachary Ware added the comment: Considering the consensus somewhere in the middle of this discussion that this is not a Python bug, the unavailability of VS2008 Express, and the availability of the Visual C++ Compiler for Python 2.7 package, I'm closing this as 'wont fix'. If anyone just absolutely can't be satisfied by Visual C++ Compiler for Python 2.7, you can reopen. -- resolution: - wont fix stage: patch review - resolved status: open - closed versions: -Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Paul Moore added the comment: The correct solution to this issue now is to install the Microsoft supplied Visual C++ Compiler for Python 2.7 package (available as a free download from MSDN). That has all the components needed to build 32 and 64-bit extensions. Your setup.py needs to use setuptools (as there is a setuptools extension to recognise this compiler package) but otherwise the process should be seamless. Note that in spite of the name, the process should also work for Python 3.2 and 3.3, which also use VS2008 (but I haven't tested that explicitly). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Changes by Florian Bruhin python@the-compiler.org: -- nosy: +The Compiler ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Zachary Ware added the comment: Paul Moore added the comment: Note that in spite of the name, the process should also work for Python 3.2 and 3.3, which also use VS2008 (but I haven't tested that explicitly). Just 3.2; 3.3 was the first version to use VS2010. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Jurko Gospodnetić added the comment: Here's another patch fixing the Visual Studio Express edition issue plus some minor related code-cleanup. See the Hg repo at: https://bitbucket.org/jurko/cpython branch: jurko/distutils_msvc_express_fix direct link: https://bitbucket.org/jurko/cpython/commits/branch/jurko/distutils_msvc_express_fix Basically - native 64-bit compiler is not available with Visual Studio Express edition, but its 32-bit to 64-bit cross-compiler is, so the fix just attempts to configure the cross-compiler if configuring the native compiler fails to set all the necessary environment variables. Tested to work correctly with Visual Studio Express edition installed, and no additional Platform SDK. I'm also directly attaching a bundle containing the same commits. I've split up the changes into cleanly separated commits so they should be real easy to review verify, and there should be no risk of breakage in use cases not explicitly attacked by the proposed changes. Hope this helps. Best regards, Jurko Gospodnetić -- hgrepos: +274 nosy: +Jurko.Gospodnetić Added file: http://bugs.python.org/file36822/CPython_msvc_express_fix_based_on_ec3077e23b7d1353af65a987d4caaef4343bdb41.hg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Changes by Jurko Gospodnetić jurko.gospodne...@gmail.com: Added file: http://bugs.python.org/file36823/218ef482e1e4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Changes by Jurko Gospodnetić jurko.gospodne...@gmail.com: Removed file: http://bugs.python.org/file36823/218ef482e1e4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Paul Moore added the comment: From the comments here, there seems to be a belief that this is somehow related to VC Express only. I have hit this error when using the MS SDK (both 7.0 on Python 2.7, and 7.1 on Python 3.3 and 3.4) with DISTUTILS_USE_SDK set. Unless I have somehow misconfigured my installation, this bug prevents me from having any means of building Python extensions using free tools for 64-bit Windows. It is possible I have misconfigured something, as I am working from various notes on the web, plus trial and error, because there is no official documentation I have found on how to set up the SDK for use with distutils in this manner. -- nosy: +pmoore ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Changes by Brian Curtin br...@python.org: -- nosy: -brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Mark Lawrence added the comment: I'm assuming that the 2.7 patch is still valid but have no idea whether or not any work is needed on 3.4 or 3.5. -- nosy: +BreamoreBoy, zach.ware versions: +Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Steve Dower added the comment: There is other work going on that will make the patches unnecessary. One problem is that vcvarsall.bat isn't where msvc9compiler.py is looking, which can be fixed with monkey patching in setup.py or in setuptools. The other problem is that VC9 is hard to get hold of these days. I'm working on both problems and dealing with the big-company-inertia problem. For 3.5 I'll update msvc9compiler.py as part of my VC14 support. 3.4 (and 3.5 in the meantime) don't need to be updated as the easiest way to get VC10 is still as part of VS 2010. However, when the VS 2010 download is removed then things will become more difficult. In general, I think we're better off helping package developers make builds/wheels than we are helping users to get the compiler. Windows just doesn't have enough platform incompatibilities to make it worthwhile. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Changes by Boris Dayma koush...@gmail.com: -- nosy: +Borisd13 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: -skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +brian.curtin, tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Mike Mazurek added the comment: In building pycrypto for python 3.4 I applied patch msvccompiler9_33.diff. After applying the patch there is an unassigned variable: KEY_BASE on line 67 of the patched file. After setting KEY_BASE = Software\\Wow6432Node\\Microsoft\\ before its first use I was able to successfully build pycrypto. -- nosy: +mike.mazurek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
anuj0990 added the comment: This is very useful information shared here. I am really thankful for this. a href=http://www.99th.co.in 99th.co.in/a -- nosy: +anuj0990 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Changes by Ned Deily n...@acm.org: -- Removed message: http://bugs.python.org/msg212255 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Justin Foo added the comment: I think getting this bug fixed would be really nice from a user experience point of view. I've further into this for my own setup, which is Python 3.3 64-bit, Visual C++ Express 2010 and the Windows SDK v7.1 (plus service packs), which is probably a typical setup for a user looking to build Python extensions without paying for a compiler. Here's what I've noticed, apart from the fact that msvccompiler9.py is a mess. query_vcvarsall executes vcvarsall.bat amd64 set. The first part, trying to delegate to another batch file that doesn't exist, will fail. So no environment variables will be set, but the PATH environment variable always exists, hence ValueError: ['path']. The DISTUTILS_USE_SDK environment variable is useless, even leaving aside the fact that MsSdk also needs to be defined. The idea is that distutils will trust that the user has set the appropriate environment variables (e.g. SetEnv.Cmd /Release). However, successful compilation of 64-bit extensions won't rely on this variable at all: 1. DISTUTILS_USE_SDK/MsSdk defined, SetEnv not called: cl.exe and friends can't be resolved and nothing works. 2. DISTUTILS_USE_SDK/MsSdk defined, SetEnv called: cl.exe and friends can be resolved and everything works. 3. DISTUTILS_USE_SDK/MsSdk undefined, SetEnv not called: vcvarsall.bat amd64 will fail and we end up with ValueError: ['path'] as above. 4. DISTUTILS_USE_SDK/MsSdk undefined, SetEnv called: in query_vcvarsall, vcvarsall.bat amd64 still fails, but it doesn't matter at this point, because the environment variables INCLUDE, LIB, LIBPATH and PATH will exist, so parsing vcvarsall.bat amd64 set works. This doesn't guarantee linking with the correct bitness, but one would hope so :) I believe SetEnv.Cmd can be found using HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1\WinSDKTools or HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.1\WinSDKTools. -- versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
ipatrol added the comment: The latest patch has an indentation error in an if-else clause, but I can't figure out what exactly was intended by the author. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Changes by Martin v. Löwis mar...@v.loewis.de: -- assignee: loewis - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Martin v. Löwis added the comment: Steve: Why are you providing a Python 3.3 patch? AFAICT, the issue does not exist with VS 2010 (express). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Steve Dower added the comment: My patches (which I've backed away from now - between wheels and monkey patching Distutils from a setup.py, there are enough workarounds) also handled the fact that VS 2008 is no longer freely/officially available, and presumably VS 2010 will eventually go the same way. From my point of view, VC++ 2008 Express not including 64-bit compilers is less of a concern than VC++ 2008 Express not being available at all. The Windows SDK is the only way that VC9 is distributed now, but it doesn't install the vcvarsall.bat file that Distutils needs. The same goes for the version of the SDK that includes VC10. These patches look in the registry for the actual paths, rather than just to find a batch file that isn't a component of the compiler. (FWIW, the patches should be identical apart from some Python 2/3 differences - the version number is parameterised.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Justin Foo added the comment: The speedups extension for MarkupSafe (which has a pure Python fallback) on Python 3.3.3 64-bit was happily compiled with `pip install markupsafe` after applying Steve's patch and Li Wah's definition for KEY_BASE. -- nosy: +jfoo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Changes by Martin Dengler mar...@martindengler.com: -- nosy: +mdengler ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Steve Dower added the comment: I believe that is all that is missing from the patches I posted, though I'd have thought that having Visual C++ 2010 Express installed would be sufficient without the patch (though you didn't mention C++, so maybe you have a different one?). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Li Wah Teng added the comment: About the 'KEY_BASE' is not defined error in Steve Dower's diff, I was able to fix it by adding the following line before the KEY_BASE variable is referenced: KEY_BASE = rSoftware\Microsoft\\ With this, I was finally able to use the patched msvccompiler9.py to build PyCrypto using VS Express 2010 with Windows SDK 7.1 and Python 3.3.2 (64-bit) installed. If someone can confirm that this is the only thing missing in the 2 versions of the msvccompiler9.diff files, it would be great. Hope it helps! -- nosy: +lwteng ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Bill Gale added the comment: so i hit the same exception, here is how i solved it. environment: windows 7 enterprise 64 bit python 2.7.5 64 bit visual studio 2008 32 bit issue: pip installs failed with the above exception. solution: there are two parts. 1. install 64 bit components to vs2008 2. modify the PATH to point to 64 bit vs2008 bin folder to confirm is this solution will help you: check if there is an amd64 under your vs2008 bin folder: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin if yes, this solution will not help you. if missing follow the steps below. step 1. control panel select Microsoft Visual Studio 2008 Professional -ENU window Visual Studio 2008 Maintenance Mode is opened click through to and select Add or Remove Features Under Language Tools-VC++ X64 Compilers and Tools should be unchecked. if it is checked, skip to step 2. check X64 Compilers and Tools, Update. you may have to provide the VS2008 installation CD. confirm that update creates bin\amd64 subfolder. step 2. add 64 bit subfolder to your path. VS2008_HOME=C:\Program Files (x86)\Microsoft Visual Studio 9.0 PATH=%PATH%;%VS2008_HOME%\VC\bin;%VS2008_HOME%\VC\bin\amd64; open new command window to receive new PATH changes. pip installations should no die with the ValueError. -- nosy: +bgale ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Steve Dower added the comment: I must have missed something when I merged files to create the diffs. In any case, you'll still require VC9 or VC10 to be able to build something compatible with a CPython release (though maybe that doesn't matter for Cython? I don't know). When I get a chance I'll fix up the changes and then ping Python-Dev about getting a review. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Frankie Jhou added the comment: Microsoft using Visual Studio 2012 (VC 11.0) now, Errors happened again. I just want to install Cython. Error: Unable to find vcvarsall.bat ValueError: [u'path', u'include', u'lib'] NameError: name 'KEY_BASE' is not defined KeyError: '9.0' error: command 'cl.exe' failed: No such file or directory -- nosy: +Frankie.Jhou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Steve Dower added the comment: I've added a patch that replaces query_vcvarsall() with an implementation that does not try and use the batch file. Instead, the functionality of the batch file (effectively, reading the base path from the registry and appending constants) is reproduced in Python code. (There is a second patch for 2.7, since winreg/_winreg is different between the two.) There is no reason to expect that the installation layout of VC9 and VC10 will change at this stage, though future updates may be required for new versions (though I've already added the mapping for VC11 - not that we're building Python with that one yet). I have left find_vcvarsall() in there, even though it is no longer used, in case other tools are monkeypatching to work around the existing issue. -- Added file: http://bugs.python.org/file29754/msvccompiler9_33.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Steve Dower added the comment: Adding patch for 2.7. -- Added file: http://bugs.python.org/file29755/msvccompiler9_27.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Takayuki SHIMIZUKAWA added the comment: Hi Steve, This becomes more of an issue since VC++ 2008 Express is no longer available for download (unless you're an MSDN subscriber) Here: http://www.microsoft.com/en-us/download/details.aspx?id=13276 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Steve Dower added the comment: This becomes more of an issue since VC++ 2008 Express is no longer available for download (unless you're an MSDN subscriber) Here: http://www.microsoft.com/en-us/download/details.aspx?id=13276 That's just the service pack and it won't install unless you already have VS installed. There is no way (other than being an MSDN subscriber) to get VS 2008 at this point - I've checked. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Marc-Andre Lemburg added the comment: On 23.03.2013 16:39, Steve Dower wrote: Steve Dower added the comment: This becomes more of an issue since VC++ 2008 Express is no longer available for download (unless you're an MSDN subscriber) Here: http://www.microsoft.com/en-us/download/details.aspx?id=13276 That's just the service pack and it won't install unless you already have VS installed. There is no way (other than being an MSDN subscriber) to get VS 2008 at this point - I've checked. There is, but you have to know what to look for :-) http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Steve Dower added the comment: That's just the service pack and it won't install unless you already have VS installed. There is no way (other than being an MSDN subscriber) to get VS 2008 at this point - I've checked. There is, but you have to know what to look for :-) Fair enough, but I can't (as a Microsoft employee) endorse that link or guarantee that it won't go away :) I still think it's worth fixing distutils to look in the right places for VC, since there are multiple ways of installing it that all include different batch files. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Marc-Andre Lemburg added the comment: On 23.03.2013 22:33, Steve Dower wrote: Steve Dower added the comment: That's just the service pack and it won't install unless you already have VS installed. There is no way (other than being an MSDN subscriber) to get VS 2008 at this point - I've checked. There is, but you have to know what to look for :-) Fair enough, but I can't (as a Microsoft employee) endorse that link or guarantee that it won't go away :) I still think it's worth fixing distutils to look in the right places for VC, since there are multiple ways of installing it that all include different batch files. Sure, no question about that. Adding support for more MS VC versions is always a plus :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Steve Dower added the comment: This becomes more of an issue since VC++ 2008 Express is no longer available for download (unless you're an MSDN subscriber), though the compiler itself is still available as part of http://www.microsoft.com/en-us/download/details.aspx?id=3138 (for VC9) I'll admit I haven't read all the discussion on other issues that relates to this, but I see no reason why the following maps couldn't be tried if vcvarsall.bat is not found. This would at least handle more cases and as far as I can tell is the only realistic option. VCVARS_TO_WINSDK_BAT = { 'x86' : 'bin\\vcvars32.bat', 'amd64' : 'bin\\vcvars64.bat', 'x86_amd64' : 'bin\\vcvarsx86_amd64.bat', 'x86_ia64' : 'bin\\vcvarsx86_ia64.bat', } VCVARS_TO_VS_BAT = { 'x86' : 'bin\\vcvars32.bat', 'amd64' : 'bin\\amd64\\vcvars64.bat', 'x86_amd64' : 'bin\\x86_amd64\\vcvarsx86_amd64.bat', 'x86_ia64' : 'bin\\x86_ia64\\vcvarsx86_ia64.bat', } I have no idea why, but the SDK installs the batch files into different locations. VCVARS_TO_VS_BAT should be unnecessary, since vcvarsall.bat should always exist in this case, but I see no harm in having more fallback options. All of these scripts (at least for VC9, VC10 and VC11) will ignore extra arguments. -- nosy: +steve.dower ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Steve Dower added the comment: ('ignore extra arguments' meaning they could be returned from find_vcvarsall() and nobody will notice. Though it doesn't bother me if the fallback is handled at a higher level.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Steve Dower added the comment: I've dug deeper into VC10 and things are even worse there - without VS installed I don't think there's any way for distutils to work without completely replacing query_vcvarsall() (or msvc9compiler, for that matter). I'm willing to write such a replacement, assuming I can get permission from my management. But I'd rather not do it if someone else is already working on it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Takayuki SHIMIZUKAWA added the comment: FYI. I was able to build both 32bit/64bit. Python 2.7.3 (32bit) WinXP Professional SP3 (x86) Visual Studio C++ Express 2008 SP1 Microsoft Windows SDK 2008 invoke Windows SDK's `CMD Shell` and do following: C:\tmp setenv /x64 /release C:\tmp set libpath=dummy C:\tmp python setup.py build --plat-name=win-amd64 build_ext --library_dirs=C:\Python27\libs-amd64 details is here: http://www.freia.jp/taka/blog/python-win32-binary-building-and-x64-cross-compiling-on-32bit-platform/index.html -- nosy: +shimizukawa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Daniel Oźminkowski added the comment: Python 2.7.3 WinXP Professional 2002 + SP3 Visual Studio C++ Express 2008 I bumped into this error trying to install fabric. One of the installation steps is compiling pycrypto. After looking into C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat I saw: %VS90COMNTOOLS%vsvars32.bat so I run: set VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools directly before pip install fabric and it compiled successfully. Still need to see if it works. -- nosy: +Daniel.Ozminkowski ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Piotr Dobrogost p...@bugs.python.dobrogost.net added the comment: Just bumped into this issue when installing gevent 1.0b2 on Vista 64bit using pip. I think it would be worth to mention that although I'm not quite new to Python and in the past I already investigated issue with distutils not finding vcvarsall.bat (http://stackoverflow.com/a/5122521/95735), I didn't remember about DISTUTILS_USE_SDK environment variable. What I'm trying to say is that there are probably more people like me, having Visual Studio 2008 Express + Windows SDK installed but not knowing distutils. After seeing that Windows SDK installs 64bit compiler into VC\bin folder of Visual Studio's installation I thought that Python would pick it up automatically the same way it does with non Express versions of Visual Studio. -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: -mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Yap Sok Ann sok...@gmail.com added the comment: On 64-bit Windows with Visual Studio 2008 Professional, I also need to apply vcvars4.diff to avoid getting the ValueError. Is this something to be expected? -- nosy: +sayap ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Victor Lin borns...@gmail.com added the comment: My environment is Windows 7 64bits with VC++ 2008 Express and Python2.7.2. I encountered same problem, I have tried all solution posted here, but non of them work. Eventually, I add C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin to my PATH and it works. It appears that the command vcvarsall.bat x86 set outputs different values depending on whether C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin in PATH. -- nosy: +Victor.Lin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Martin v. Löwis mar...@v.loewis.de added the comment: Victor, can you apply this patch and report that it works. In particular, if it does *not* work, can you please report the exact way of failing? (if you can, please also try to investigate why it fails). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Victor Lin borns...@gmail.com added the comment: Oddly, can't reproduce the problem anymore. I try to install win7 on virtual machine, but it works as well. I think the issue might caused by something else... not sure, so strange :S Will look into detail once I encounter this issue again. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Sean Reifschneider j...@tummy.com added the comment: Martin: They are looking for you to review this, in particular see: http://bugs.python.org/issue7511#msg106420 -- assignee: tarek - loewis nosy: +jafo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Éric Araujo mer...@netwok.org added the comment: Hmm, in http://bugs.python.org/issue7511#msg106420 Tarek appeared to be supportive of the patch. I believe Martin has more knowledge about Windows. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Stefan Krah stefan-use...@bytereef.org added the comment: Marc-Andre Lemburg rep...@bugs.python.org wrote: Regarding the latest patch: This is not the right approach, since find_vcvarsall() is supposed to return the path to the vcvarsall.bat file and not an architecture specific setup file. It is later called with the arch identifier, which the arch specific setup files don't check or use. The patch does not change anything for Visual Studio Pro. In Visual Studio Express (+SDK) vcvarsall.bat is broken, so the architecture specific setup files have to be used (they also work with a superfluous parameter). I guess what I wanted to say is that find_vcvarsall() should return None for VC Express and code using it should then revert to using a new find_vcvars() function, which takes the architecture as parameter and returns the path to the correct architecture setup file. Hacking the support into find_vcvarsall() is not the right approach. You have to add this support one level further up. I agree that it is nicer if find_vcvarsall() actually returns vcvarsall. The next level though is query_vcvarsall(), so it would still be wrong to query vcvars64 in that function. So unless query_vcvarsall() is renamed to something neutral like set_vcvars(), I'm not sure where to add the support. But I imagine that renaming is out of the question. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: -r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Marc-Andre Lemburg m...@egenix.com added the comment: Stefan Krah wrote: Stefan Krah stefan-use...@bytereef.org added the comment: Marc-Andre Lemburg rep...@bugs.python.org wrote: Wouldn't it be better to have distutils tell the user about the possible options, instead of guessing and then possibly compiling extensions which later on don't import or import, but don't work as expected ? That would be an option, yes. Regarding the latest patch: This is not the right approach, since find_vcvarsall() is supposed to return the path to the vcvarsall.bat file and not an architecture specific setup file. It is later called with the arch identifier, which the arch specific setup files don't check or use. The patch does not change anything for Visual Studio Pro. In Visual Studio Express (+SDK) vcvarsall.bat is broken, so the architecture specific setup files have to be used (they also work with a superfluous parameter). I guess what I wanted to say is that find_vcvarsall() should return None for VC Express and code using it should then revert to using a new find_vcvars() function, which takes the architecture as parameter and returns the path to the correct architecture setup file. Hacking the support into find_vcvarsall() is not the right approach. You have to add this support one level further up. Also note that vcvarsall.bat can take these options: x86 (default), x64, amd64, x86_amd64, ia64, x86_ia64 The x86_* options setup the cross compilers. I think the patch covers all architecture specific files that are present in the Visual Studio Express + SDK setup. Right, but it doesn't cover the ones available in VS Pro (see above), which it should for completeness. Visual Studio Pro is protected from all changes by checking for the presence of the file bin\amd64\vcvarsamd64.bat. This could probably be done more elegantly by using some obscure registry value. As Thorsten mentioned, another option would be to copy bin\vcvars64.bat to bin\amd64\vcvarsamd64.bat if the latter is not present. This is harmless, but it is perhaps not really the business of Python to mess with existing installs. Not a good idea :-) PS: Changing the title, since I keep getting the following error messages from the email interface: There were problems handling your subject line argument list: - not of form [arg=value,value,...;arg=value,value,...] Subject was: Re: [issue7511] msvc9compiler.py: ValueError: [u'path'] -- title: msvc9compiler.py: ValueError: [u'path'] - msvc9compiler.py: ValueError when trying to compile with VC Express ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com