[问题]Python连接问题
发表于 : 2008-06-10 21:10
我在编译awn-extras-applets-0.2.6遇到如下问题:
首先我以为是python没有安装,但去新立得一看,python2.5, python2.4等已经安装,安照它上面的例子,我找到/usr/lib/python2.5下面有两个与lib有关的文件珓,试了以下代码还是出现了上面的问题:
然后我测了下想看看是不是我的python没有装好,结果发现python没有问题:
实在没有办法,我在新立得里找到python-all的软件包,给装了后,试了下面几个命令还是都有上里的问题:
基于这种情况,请问该如何解决这些问题,网上我没找到相关的解决方法。谢谢。
补充一下:
我看了INSTALL的说明里,说要指明python的版本。
我的版本是上面所看到的,Python 2.5.2,不知道该如何添加。
后来,我又试了这个代码,还是不行。
代码: 全选
checking consistency of all components of python development environment... no
configure: error:
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure,
via the LDFLAGS environment variable.
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
============================================================================
ERROR!
You probably have to install the development version of the Python package
for your distribution. The exact name of this package varies among them.
============================================================================
代码: 全选
./configure LDFLAGS="-L/usr/lib/python2.5/lib-dynload"
./configure LDFLAGS="-L/usr/lib/python2.5/lib-tk"
代码: 全选
weasteam@weasteam-desktop:~$ python
Python 2.5.2 (r252:60911, May 7 2008, 15:19:09)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
代码: 全选
./configure
./configure LDFLAGS="-L/usr/lib/python/lib"
./configure LDFLAGS="-L/usr/lib/python2.5/lib"
./configure LDFLAGS="-L/usr/lib/python2.5"
./configure LDFLAGS="-L/usr/bin"
补充一下:
我看了INSTALL的说明里,说要指明python的版本。
代码: 全选
PYTHON_VERSION
The installed Python version to use, for example '2.3'. This
string will be appended to the Python interpreter canonical
name.
后来,我又试了这个代码,还是不行。
代码: 全选
./configure PYTHON_VERSION=2.5.2
./configure PYTHON_VERSION=2.5
./configure PYTHON_VERSION="2.5"