2017년 6월 17일 토요일

python3 swig openframeworks windows tensorflow

1. install python3 64bit
2. modify python3/include/pyconfig.h => #ifdef _DEBUG
//# define Py_DEBUG
#endif
pragma comment(lib,"python35.lib")
3. modify python3/lib/argparse.py => props = ''
4. clone ofxPython
cd swig-additional, swig -c++ -python -fcompact -fvirtual -I../../../libs/openFrameworks -I../src openframeworks_extra.i
openframeworks_extra_wrap.cxx to *.cpp
5. install tensorflow
6. if cuda, add cuda include & lib path in MSVC2015
7. add python3 include & lib in MSVC2015
8. add PyImport_AppendInittab("_openframeworks_extra", PyInit__openframeworks_extra);
9. modif #define PyString_AsString(str) PyUnicode_AsUTF8String(str)
10. modify return string(PyBytes_AsString(PyString_AsString(get()->obj)));
11. build Debug, x64
12 ofLog() << lines[j].asString() -> lines[j].str() in ofxPython.cpp
13 ofLog() << "\t" << "Error: " << opvalue.str() -> opvalue.repr() in ofxPython.cpp


cuda error
numpy error
arch error

댓글 없음: