Cython problem in Windows XP: “error: Unable to fi

2019-05-08 04:23发布

问题:

Cython version is 0.13, Python 3.1 I have tried all "solutions" in Cython FAQ, but to no avail. My version of Visual Studio is 7.1 and its directory doesn't contain vcvarsall.bat. Is this problem have a solution?

回答1:

SO search and you will find ample discussion on this.

  • https://stackoverflow.com/search?q=vcvarsall.bat

[Edit: based on comment below]

When you run setup.py install on windows, distutils looks for vcvarsall.bat to run.

About vcvarsall.bat

VCVarsall.bat is Visual Studio Command Prompt tool in Visual Studio. It allows you to set various options for the integrated development environment (IDE) as well as build, debug, and deploy projects from the command line.

What if it does not find this file

Solution 1: Hunt the file

  1. distutils has an hardcoded path to vcvarsall.bat.
  2. find the file starting with vc*.bat or vc*.cmd. The file which sets up command line environment for MS compiler tool chain. The location is inconsistent for different versions of visual studio setup. If you are running 32 bit version then you should be able to find vcvars32.bat.
  3. drop it in the directory distutils expect it to be.