cenots InvalidRequirement: Invalid requirement, parse error at "'_sqlite3'"

原创 赤水  2017年3月2日 17:58 阅读 9 次
In [1]: import sqlite3  #导入sqlite3 报错
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-b70399fc848f> in <module>()
----> 1 import sqlite3

/usr/local/python_2.7/lib/python2.7/sqlite3/__init__.py in <module>()
     22 # 3. This notice may not be removed or altered from any source distribution.
     23 
---> 24 from dbapi2 import *

/usr/local/python_2.7/lib/python2.7/sqlite3/dbapi2.py in <module>()
     25 import time
     26 
---> 27 from _sqlite3 import *
     28 
     29 paramstyle = "qmark"

ImportError: No module named _sqlite3


[root@Test seopush]# pip install _sqlite3	#安装报错
Invalid requirement: '_sqlite3'
Traceback (most recent call last):
  File "/usr/local/python_2.7/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 82, in __init__
    req = Requirement(req)
  File "/usr/local/python_2.7/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg/pip/_vendor/packaging/requirements.py", line 96, in __init__
    requirement_string[e.loc:e.loc + 8]))
InvalidRequirement: Invalid requirement, parse error at "'_sqlite3'"

[root@Test seopush]# find / -name _sqlite*.so  #查找_sqlite3.so
/usr/lib64/python2.6/lib-dynload/_sqlite3.so
/usr/lib64/python2.6/site-packages/_sqlitecache.so
/usr/local/aegis/SecureCheck/lib/python2.7/lib-dynload/_sqlite3.so


[root@Test seopush]# find / -name lib-dynload
/usr/lib64/python2.6/lib-dynload
/usr/local/aegis/SecureCheck/lib/python2.7/lib-dynload
/usr/local/python_2.7/lib/python2.7/lib-dynload

cp /usr/lib64/python2.6/lib-dynload/_sqlite3.so  /usr/local/python_2.7/lib/python2.7/lib-dynload	#复制 _sqlite3.so
本文地址: https://blog.lssin.com/readblog/130.html
版权声明:本文为原创文章,版权归  赤水 所有,欢迎分享本文,转载请保留出处!

发表评论


表情