hankcs / hankcs/tmsvm

个人问题提交

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
Python
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
不知道算不算bug吧
环境是ubuntu12.04 32bit python2.7
在使用example.py过程中,发生如下错误
Traceback (most recent call last):
File "/home/sleeperqp/tmsvm/dependence/pymmseg.py", line 15, in
mmseg = CDLL(os.path.join(os.path.dirname(__file__),"./mmseg.so.64"))
File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /home/sleeperqp/tmsvm/dependence/./mmseg.so.64: wrong ELF class:
ELFCLASS64

在pymmseg.py第15行中找到了原因,将mmseg.so.64修改成32即可
# -*- coding: utf-8 -*-

import sys
from ctypes import *
from ctypes.util import find_library
from os.path import join, dirname, abspath, exists
import os

if find_library('mmseg'):
mmseg = CDLL(find_library('mmseg'))
else:
if sys.platform == 'win32':
mmseg = CDLL(os.path.join(os.path.dirname(__file__),"./mmseg.dll"))
else:
mmseg = CDLL(os.path.join(os.path.dirname(__file__),"./mmseg.so.64"))

最后感谢你的这些工作,真心感谢~

```

Original issue reported on code.google.com by `Qipeng1...@gmail.com` on 25 Aug 2013 at 8:36

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.