0
cdef extern from "cblas.h":
enum CBLAS_ORDER:
    CblasRowMajor=101
    CblasColMajor=102
enum CBLAS_TRANSPOSE:
    CblasNoTrans=111
    CblasTrans=112
    CblasConjTrans=113
    AtlasConj=114

This code returns the error

CompileError: Command "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\ProgramData\Anaconda2\lib\site-packages\numpy\core\include -IC:\ProgramData\Anaconda2\lib\site-packages\numpy\core\include -IC:\ProgramData\Anaconda2\include -IC:\ProgramData\Anaconda2\PC /TcC:\Users\MyPC.ipython\cython_cython_magic_ccc18a1fe0d778405242b7bd9128f2ff.c /FoC:\Users\MyPC.ipython\cython\Users\MyPC.ipython\cython_cython_magic_ccc18a1fe0d778405242b7bd9128f2ff.obj" failed with exit status 2..

I'm not sure how to fix it, I need to be able to access cblas.h. Is it because I haven't properly set up the cblas files, or my compiler is not working? What's the issue, I am not too familiar with cython.

Here's a picture of what appeeared on my command line terminal: error I just noticed that it said it could not find the file/directory. This was helpful, thanks to who pointed out it should show the error on my command line.

In any case, can someone indicate what this error is not? For example, should I be able to do "cdef extern from "cblas.h"" as long as the ipython notebook running the code is in the same folder as "cblas.h"? Thanks!

ffffffyyyy
  • 117
  • 2
  • 7
  • I suspect that isn't the full error message you got and if you scroll up you'll see something more useful. If that's the case please edit it into your question – DavidW Nov 20 '17 at 17:43
  • Something that may make your life easier: SciPy provides BLAS and LAPACK wrappers for Cython. You can access them by cimporting `scipy.linalg.cython_blas` and `scipy.linalg.cython_lapack`. That aside, the information you've provided indicates that the C compiler failed when compiling the C file generated from the Cython source, but doesn't include the error. The error may have been printed out in the command line terminal where you originally started the Jupyter notebook. – IanH Nov 20 '17 at 17:44
  • 1
    The compiler will look for the file `cblas.h` in a standard list of directories (that I don't know on windows). You can specify extra include paths for the compilation with the `-I` (uppercase i) to the `%%cython` cell magic. (Do not copy the `cblas.h` file to the current directory, include the actual location instead). – Pierre de Buyl Nov 21 '17 at 09:14

0 Answers0