error: use of undeclared identifier 'PyString_AsString' Python2中存在该方法,Python3中已经取消了。 解决方案: 使用'PyBytes_AsString'代替试试看。