分页: 1 / 2
:py E448: Could not load library function PyArg_Parse
发表于 : 2011-11-21 17:37
由 rykka
编译vim7.3.353后
脚本中的python 运行正常
但是cmdline 的:py 会出错。
:py
E448: Could not load library function PyArg_Parse
E263: Sorry, this command is disabled, the Python library could not be loaded.
:py3
E448: Could not load library function PySys_SetArgv
E263: Sorry, this command is disabled, the Python library could not be loaded.
编译选项
代码: 全选
./configure --enable-multibyte --with-features=huge --enable-gui=gnome2 \
--enable-python3interp=yes --enable-rubyinterp --enable-pythoninterp=yes \
--enable-tclinterp --enable-fontset \
--with-python-config-dir=/usr/lib/python2.7/config \
--with-python3-config-dir=/usr/lib/python3.2/config
os:ubuntu 11.10 32bit
Re: :py E448: Could not load library function PyArg_Parse
发表于 : 2011-11-21 19:16
由 lilydjwg
--enable-python[3]interp ==> dynamic
Re: :py E448: Could not load library function PyArg_Parse
发表于 : 2011-11-21 19:39
由 rykka
recompiled with dynamic ,
+python/dyn +python3/dyn
依然如此。

Re: :py E448: Could not load library function PyArg_Parse
发表于 : 2011-11-21 19:41
由 rykka
难道重装系统的时候又到了么……
Re: :py E448: Could not load library function PyArg_Parse
发表于 : 2011-11-21 19:58
由 lilydjwg
找找 libpython2.7.so,看看里边有没有 PyArg_Parse。
代码: 全选
objdump -t libpython2.7.so
Re: :py E448: Could not load library function PyArg_Parse
发表于 : 2011-11-21 20:09
由 rykka
代码: 全选
objdump -t /usr/lib/libpython2.7.a | grep PyArg_Parse
有PyArg_Parse
代码: 全选
objdump -t /usr/lib/libpython2.7.so
什么symbol都没有
Re: :py E448: Could not load library function PyArg_Parse
发表于 : 2011-11-21 20:31
由 lilydjwg
rykka 写了:代码: 全选
objdump -t /usr/lib/libpython2.7.a | grep PyArg_Parse
有PyArg_Parse
代码: 全选
objdump -t /usr/lib/libpython2.7.so
什么symbol都没有
。。。。你的 libpython2.7.so 有问题。是不是你自己编译的啊?
Re: :py E448: Could not load library function PyArg_Parse
发表于 : 2011-11-21 20:34
由 rykka
virtualbox里面archlinux的 vim 7.3.338就可以用:py
objdump -t /usr/lib/libpython2.7.so | grep PyArg_Parse
也有很多输出。
如此看来,我应该重编译python 2.7 的 share object 吗?
Re: :py E448: Could not load library function PyArg_Parse
发表于 : 2011-11-21 20:35
由 rykka
我没编译过啊,只不过我是11.04直接升级的11.10
Re: :py E448: Could not load library function PyArg_Parse
发表于 : 2011-11-21 20:48
由 lilydjwg
rykka 写了:virtualbox里面archlinux的 vim 7.3.338就可以用:py
objdump -t /usr/lib/libpython2.7.so | grep PyArg_Parse
也有很多输出。
如此看来,我应该重编译python 2.7 的 share object 吗?
看样子是。记得
--enable-share类似这样的一个选项。
Re: :py E448: Could not load library function PyArg_Parse
发表于 : 2011-11-21 21:14
由 rykka
我只知道这个
代码: 全选
gcc -shared -lc -o libpython2.7.so libpython2.7.a
生成的so有symbol了,但是还是没有PyArg。
Re: :py E448: Could not load library function PyArg_Parse
发表于 : 2011-11-21 21:59
由 lilydjwg
rykka 写了:我只知道这个
代码: 全选
gcc -shared -lc -o libpython2.7.so libpython2.7.a
生成的so有symbol了,但是还是没有PyArg。
我试过了,这样做基本上还是什么都没有嘛。
Re: :py E448: Could not load library function PyArg_Parse
发表于 : 2011-11-21 22:04
由 rykka
是的。
reinstall python的话依赖太多了,重装系统又太废时间,用官方版本的话版本又太落后。
我还是先用virtualbox里面的吧

Re: :py E448: Could not load library function PyArg_Parse
发表于 : 2011-11-21 22:10
由 lilydjwg
rykka 写了:是的。
reinstall python的话依赖太多了,重装系统又太废时间,用官方版本的话版本又太落后。
我还是先用virtualbox里面的吧

直接从 vbox 里 cp 出来试试?
Re: :py E448: Could not load library function PyArg_Parse
发表于 : 2011-11-21 22:56
由 rykka
lilydjwg 写了:rykka 写了:是的。
reinstall python的话依赖太多了,重装系统又太废时间,用官方版本的话版本又太落后。
我还是先用virtualbox里面的吧

直接从 vbox 里 cp 出来试试?
用virtualbox的shared folder。
sudo mount -t vboxsf vm_share /mnt/share
提示no such directory。
最后用dropbox同步出来。
复制了gvim 和 libpython2.7.so
运行gvim提示:no libperl.so 。但是在archlinux下根本找不到libperl.so
覆盖了libpython2.7.so
make clean && make && make install
但是问题依旧。
……