cython failed with exit status 2 when trying to access library

旧城冷巷雨未停 提交于 2019-12-11 16:19:00

问题


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!

来源:https://stackoverflow.com/questions/47390860/cython-failed-with-exit-status-2-when-trying-to-access-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!