- 论坛徽章:
- 0
|
事情大致是这样的,unix SPARC机器上,装了python2.7.1
bash-3.00# ./python
Python 2.7.1 (r271:86832, Aug 22 2011, 14:01:04)
[GCC 3.4.3 (csl-sol210-3_4-branch+sol_rpath)] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>>
用户要求安装一个名为ipython-0.11的程序,但是安装时,发现如下报错:
bash-3.00# python setup.py install
Traceback (most recent call last):
File "setup.py", line 54, in <module>
from IPython.utils.path import target_update
File "/tmp/ipython-0.11/IPython/__init__.py", line 46, in <module>
from .frontend.terminal.embed import embed
File "/tmp/ipython-0.11/IPython/frontend/terminal/embed.py", line 32, in <module>
from IPython.frontend.terminal.interactiveshell import TerminalInteractiveShell
File "/tmp/ipython-0.11/IPython/frontend/terminal/interactiveshell.py", line 26, in <m odule>
from IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC
File "/tmp/ipython-0.11/IPython/core/interactiveshell.py", line 36, in <module>
from IPython.core import history as ipcorehist
File "/tmp/ipython-0.11/IPython/core/history.py", line 20, in <module>
import sqlite3
File "/usr/local/lib/python2.6/sqlite3/__init__.py", line 24, in <module>
from dbapi2 import *
File "/usr/local/lib/python2.6/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3
经上网查看,怀疑python没有导入该sqlite3模块。但是官方信息都证实,python2.5之后软件本身都兼容了sqlite3。
我尝试进入python后,手动导入,出现如下报错:
bash-3.00# ./python
Python 2.7.1 (r271:86832, Aug 22 2011, 14:01:04)
[GCC 3.4.3 (csl-sol210-3_4-branch+sol_rpath)] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>> import sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/proj/application/tools/Python7.1_sol/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
from dbapi2 import *
File "/proj/application/tools/Python7.1_sol/lib/python2.7/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3>>> ^D
bash-3.00#
server上以确认安装了sqlite
bash-3.00# cd /usr/local/sqlite/
bash-3.00# ls
bin include lib share
bash-3.00#
bash-3.00# cd bin
bash-3.00# ls
sqlite3
bash-3.00# ls -l
total 224
-rwxr-xr-x 1 root root 106020 Aug 19 12:16 sqlite3
bash-3.00#
求高手指点,问题出在哪里。 |
|