Open Tian14267 opened 5 years ago
@whai362
你好,我遇到了和你一样的问题,请问你这个问题解决了吗
@skye95git 你的问题还存在吗?我重新下载编译,现在遇到#23的问题了
问题已经解决。在问题#23中一样,在用python3编译的时候,需要确定自己的python是具体哪个版本。python3.5,还是python3.6。具体可以查看路径:/usr/include/ 在这个文件夹内找python的文件(python2.7或者python3.5)。然后按照#23的方法修改: 修改pse/include/pybind11/detail/common.h中的第112~114:
为:
因为我的python是3.5版本。具体可以根据自己的版本修改。需要用到的"Python.h"、“frameobject.h”、“pythread.h”都在/usr/include/python3.5/ 这个文件夹里面。改完之后编译就ok了。
cd pse
make
问题已经解决。在问题#23中一样,在用python3编译的时候,需要确定自己的python是具体哪个版本。python3.5,还是python3.6。具体可以查看路径:/usr/include/ 在这个文件夹内找python的文件(python2.7或者python3.5)。然后按照#23的方法修改: 修改pse/include/pybind11/detail/common.h中的第112~114:
include <python2.7/Python.h>
include <python2.7/frameobject.h>
include <python2.7/pythread.h>
为:
include <python3.5/Python.h>
include <python3.5/frameobject.h>
include <python3.5/pythread.h>
因为我的python是3.5版本。具体可以根据自己的版本修改。需要用到的"Python.h"、“frameobject.h”、“pythread.h”都在/usr/include/python3.5/ 这个文件夹里面。改完之后编译就ok了。
请问3.7的话怎么办呢?
作者你好,我在运行测试文件的时候,遇到了编译问题,具体情况如下: 用python3测试的时候,报错 include/clipper/clipper.cpp:1051:1: error: stray ‘\273’ in program include/clipper/clipper.cpp:1051:1: error: stray ‘\333’ in program include/clipper/clipper.cpp:1051:7: warning: missing terminating " character include/clipper/clipper.cpp:1051:1: error: missing terminating " character include/clipper/clipper.cpp:1:2: error: expected declaration before ‘}’ token }ڠ ٠ ¼G¥ӓN> þÿ
from pse import pse
File "/home/hj/smbshare/fffan/PSEnet/Pytorch_PSEnet_OCR_tensorflow/pse/init.py", line 9, in
raise RuntimeError('Cannot compile pse: {}'.format(BASE_DIR))
这个错误咱自己也看不懂,然后单独make pse,结果编译也失败了:
..........
include/clipper/clipper.cpp:1051:1: error: stray ‘\333’ in program
include/clipper/clipper.cpp:1051:7: warning: missing terminating " character
include/clipper/clipper.cpp:1051:1: error: missing terminating " character
include/clipper/clipper.cpp:1:2: error: expected declaration before ‘}’ token
}ڠ ٠ ¼G¥ӓN> þÿ [adaptor.so] Error 1
请问这个是什么原因啊。我python2可以编译出来。但是python3出了这样的问题。麻烦作者和大家帮忙看一下。谢谢。
^ Makefile:10: recipe for target 'adaptor.so' failed make: [adaptor.so] Error 1 make: Leaving directory '/home/hj/smbshare/fffan/PSEnet/Pytorch_PSEnet_OCR_tensorflow/pse' Traceback (most recent call last): File "test_PSE_OCR_tensorflow.py", line 33, in
^ Makefile:10: recipe for target 'adaptor.so' failed make: