when I import MLN, I have two errors.
- the package has no filepath 3rdparty\toulbar2-0.9.7.0\AMD64\Windows\toulbar2.exe , but 3rdparty\toulbar2-0.9.7.0\x86_64\Windows\toulbar2.exe. whereas in methods:
def toulbar2_path():
(osname, _, _, _, arch, _) = platform.uname()
# 此处需要修改为x86_64,因为上面获取的为amd64,但是库中的路径却是x86_64
arch = "x86_64"
execname = 'toulbar2'
en = is_executable(execname)
if en is not None: # use the version in PATH if it can be found
return en
# fallback: try to load shipped toulbar2 binary
if osname == 'Windows': execname += '.exe'
return os.path.join('3rdparty', 'toulbar2-{}'.format(toulbar_version), arch, osname, execname)
- sys.stdout has no attribute buffer:
line 135
# 此处也需要修改,因为标准输出流中没有buffer,是直接使用的
def write(self, stream=sys.stdout):
stream.write('{} {} {} {}\n'.format(len(self.variables), ' '.join(map(str, self.variables)), self.defcost, len(self.tuples)).encode())
for t in list(self.tuples.keys()):
stream.write('{} {}\n'.format(' '.join(map(str, t)), self.tuples[t]).encode())
the same as line 232
when I import MLN, I have two errors.
line 135
the same as line 232