您尚未登录。

#16 2014-01-17 17:17:04

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,464
个人网站

Re: makefile的一些疑问

搜代码里提到 lpsolve55.so 的地方?

这个不是 Python 引入模块失败的消息。

离线

#17 2014-01-17 20:29:46

lainme
论坛版主
注册时间: 2011-08-19
帖子: 131

Re: makefile的一些疑问

1. bathy_smoother里的lpsolver55.so需要自己另行编译,具体方法看那文章

离线

#18 2014-01-17 21:20:07

chenzhen2181
会员
注册时间: 2013-12-12
帖子: 52

Re: makefile的一些疑问

你说的对,我没有编译lpsolver55.so,只是简单的yaourt  lpsolver,这样可能不行,还是应该按照文章里的方法,我再试试!
非常感谢!

离线

#19 2014-01-18 13:39:25

chenzhen2181
会员
注册时间: 2013-12-12
帖子: 52

Re: makefile的一些疑问

我在编译lpsolver55时出现了错误。
具体如下:
编译lp_solve时,一切都很顺利
但在编译lpsolve55时出现了错误,终端显示:

libtool: unrecognized option `-static'
libtool: Try `libtool --help' for more information.
cc: error: bin/osx64/liblpsolve55.a: No such file or directory
cc: error: 5.5.0: No such file or directory
cc: error: 5.5.0: No such file or directory
cc: error: unrecognized command line option ‘-compatibility_version’
cc: error: unrecognized command line option ‘-current_version’

我的libtool版本为2.4.2-12
通过man libtool ,我可以看到-static的选项。
我也google了下,没有找到有效的解决方案,请大家给点建议。谢谢!
另: 由于我安装的archlinux是64bit的,所以我没有按照链接里的方法,对ccc.osx进行修改,直接sh ccc.osx。
ccc.osx里面有关libtool的语句是

libtool -static -o bin/$PLATFORM/liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'`

最近编辑记录 chenzhen2181 (2014-01-18 15:12:19)

离线

#20 2014-01-18 21:49:57

chenzhen2181
会员
注册时间: 2013-12-12
帖子: 52

Re: makefile的一些疑问

今天在学校又试了一遍,
之前lpsolver 安装失败,google也没解决,就直接yaourt  lpsolver 安装了。
然后下载lp_solve_5.5.0.15_Python_source ,用链接里面的方法安装,但需要在setup.py中重新设置include_dirs
这步成功了,下面就没什么问题了,最后我发现lpsolver55.so在/usr/lib/python2.7/site-packages/lpsolve55.so和/usr/lib/python2.7/site-packages/bathy_smoother/lpsolve55.so
都有。

from bathy_smoother import *

仍然会出现

lpsolve55.so not found.
Linear programming method will not be available.

删除/usr/lib/python2.7/site-packages/bathy_smoother/lpsolve55.so后,一切正常。
再次感谢lainme和仙子的支持,及其他关注的朋友。

最近编辑记录 chenzhen2181 (2014-01-20 16:22:06)

离线

页脚