Open rspeer opened 7 years ago
LargeVismodule.cpp: In function 'PyObject* LoadFromList(PyObject*, PyObject*)':
LargeVismodule.cpp:97:18: error: 'PyString_AsString' was not declared in this scope
real x = atof(PyString_AsString(PyObject_Str(PyList_GetItem(vec, j))));
^~~~~~~~~~~~~~~~~
LargeVismodule.cpp:97:18: note: suggested alternative: 'PyBytes_AsString'
real x = atof(PyString_AsString(PyObject_Str(PyList_GetItem(vec, j))));
^~~~~~~~~~~~~~~~~
PyBytes_AsString
LargeVismodule.cpp: In function 'PyObject* initLargeVis()':
LargeVismodule.cpp:130:2: error: 'Py_InitModule' was not declared in this scope
Py_InitModule("LargeVis", PyExtMethods);
^~~~~~~~~~~~~
LargeVismodule.cpp:130:2: note: suggested alternative: 'Py_Initialize'
Py_InitModule("LargeVis", PyExtMethods);
^~~~~~~~~~~~~
Py_Initialize
LargeVismodule.cpp:131:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
error: command '/usr/local/bin/gcc-7' failed with exit status 1
Hey all, did you guys ever figure out any fix?
Same here
This is related to the compatibility of python2 and python3. PyString_AsString is no longer used in Python3. The following link can help you resolve compatibility issues.
The documentation doesn't indicate this, but the LargeVis Python wrapper seems to be written as an extension module for Python 2 only. If the active environment is Python 3, then
python setup.py install
will fail with this error: