Distutils: ValueError: [u'path']

This is a really stupid error that occurs on Windows 64bit when trying to build extension modules using distutils:

  File "C:\Python27\lib\distutils\command\build_ext.py", line 340, in run
    self.build_extensions()
  File "setup.py", line 213, in build_extensions
    with_ext = self.check_extension_availability(ext)
  File "setup.py", line 239, in check_extension_availability
    depends=ext.depends)
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile
    self.initialize()
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize
    vc_env = query_vcvarsall(VERSION, plat_spec)
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsall
    raise ValueError(str(list(result.keys())))
ValueError: [u'path']

The workaround is to take the bat-file in C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat and copy it to C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat. Not that easy to figure out!

Sagt om Förbifart Stockholm

"Att bygga en ny motorväg för att minska utsläppen är ungefär lika smart som att en väldigt överviktig person försöker lösa sitt viktproblem genom att operera in en större magsäck."

Bahnhofs DNS-timeout

Bahnhof är annars en riktigt trevlig ISP men deras DNS-flood prevention algoritm är värdelös. Gör man fler än c:a 20 DNS-uppslagningar per sekund spärrar systemet en automatiskt från att göra några fler i åtminstone 20 minuter. Gränsen är satt alldeles för lågt och det är lätt att gå över den när man kodar.

A beautiful poem

Two roads diverged in a yellow wood, And sorry I could not travel both And be one traveler, long I stood And looked down one as far as I could To where it bent in the undergrowth; Then took the other, as just as fair, And having perhaps the better claim, Because it was grassy and wanted wear; Though as for that the passing there Had worn them really about the same, And both that morning equally lay In leaves no step had trodden black. Oh, I kept the first for another day! Yet knowing how way leads on to way, I doubted if I should ever come back. I shall be telling this with a sigh Somewhere ages and ages hence: Two roads diverged in a wood, and I— I took the one less traveled by, And that has made all the difference.
- Robert Frost, 1920 (or 1916)

Bloggarkiv