简体   繁体   中英

How can I get 64-bit Anaconda Python to find the MS C compiler for Cython on Windows?

How can I get 64-bit Anaconda Python to find the MS C compiler for Cython on Windows?

In Anaconda Python you run a setup.py file to compile a *.pyx source code file. Anaconda Python 2.7 is smart enough to realize it needs the MS 9.0 compiler but it complains it can't find the vcvarsall.bat file.

I've installed the MS Visual C++ for Python and I see the vcvarsall.bat file in that directory.

Is there a way to put a command in the setup.py file to tell Anaconda Python where the 64-bit MS C-compiler is?

Thank you, neil

Problem now solved. I uninstalled Anaconda 2, and installed Anaconda 3 (this installing Python 3.7), then i installed Visual Studio 2019 followed tips on https://pythondev.readthedocs.io/windows.html to get the correct compiler. Doing this cython creates the *.c file from the *.pyx code and the compiler then creates the *.pyd code and this executes. What a relief! n.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM