当前位置:   article > 正文

ModuleNotFoundError: No module named ‘_sqlite3‘_modulenotfounderror: no module named 'sqlite3

modulenotfounderror: no module named 'sqlite3
  1. [2021-01-04 05:24:00 +0000] [13884] [ERROR] Exception in worker process
  2. Traceback (most recent call last):
  3. File "/opt/venv3/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
  4. worker.init_process()
  5. File "/opt/venv3/lib/python3.8/site-packages/gunicorn/workers/ggevent.py", line 162, in init_process
  6. super().init_process()
  7. File "/opt/venv3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process
  8. self.load_wsgi()
  9. File "/opt/venv3/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
  10. self.wsgi = self.app.wsgi()
  11. File "/opt/venv3/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
  12. self.callable = self.load()
  13. File "/opt/venv3/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
  14. return self.load_wsgiapp()
  15. File "/opt/venv3/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
  16. return util.import_app(self.app_uri)
  17. File "/opt/venv3/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
  18. mod = importlib.import_module(module)
  19. File "/opt/venv3/lib/python3.8/importlib/__init__.py", line 127, in import_module
  20. return _bootstrap._gcd_import(name[level:], package, level)
  21. File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  22. File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  23. File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  24. File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  25. File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  26. File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  27. File "/opt/provision/manage.py", line 9, in <module>
  28. app = create_app(os.getenv('PROVISION_CONFIG') or os.path.join(basedir, "config.py"))
  29. File "/opt/provision/dashboard/__init__.py", line 100, in create_app
  30. from .knowledgebase import kbase as kb_blueprint
  31. File "/opt/provision/dashboard/knowledgebase/__init__.py", line 4, in <module>
  32. from . import views
  33. File "/opt/provision/dashboard/knowledgebase/views.py", line 6, in <module>
  34. from dashboard.biz.kbase import kbasebiz
  35. File "/opt/provision/dashboard/biz/kbase/kbasebiz.py", line 4, in <module>
  36. from nltk.corpus import stopwords
  37. File "/opt/venv3/lib/python3.8/site-packages/nltk/__init__.py", line 149, in <module>
  38. from nltk.translate import *
  39. File "/opt/venv3/lib/python3.8/site-packages/nltk/translate/__init__.py", line 23, in <module>
  40. from nltk.translate.meteor_score import meteor_score as meteor
  41. File "/opt/venv3/lib/python3.8/site-packages/nltk/translate/meteor_score.py", line 10, in <module>
  42. from nltk.stem.porter import PorterStemmer
  43. File "/opt/venv3/lib/python3.8/site-packages/nltk/stem/__init__.py", line 29, in <module>
  44. from nltk.stem.snowball import SnowballStemmer
  45. File "/opt/venv3/lib/python3.8/site-packages/nltk/stem/snowball.py", line 29, in <module>
  46. from nltk.corpus import stopwords
  47. File "/opt/venv3/lib/python3.8/site-packages/nltk/corpus/__init__.py", line 66, in <module>
  48. from nltk.corpus.reader import *
  49. File "/opt/venv3/lib/python3.8/site-packages/nltk/corpus/reader/__init__.py", line 105, in <module>
  50. from nltk.corpus.reader.panlex_lite import *
  51. File "/opt/venv3/lib/python3.8/site-packages/nltk/corpus/reader/panlex_lite.py", line 15, in <module>
  52. import sqlite3
  53. File "/usr/local/lib/python3.8/sqlite3/__init__.py", line 23, in <module>
  54. from sqlite3.dbapi2 import *
  55. File "/usr/local/lib/python3.8/sqlite3/dbapi2.py", line 27, in <module>
  56. from _sqlite3 import *
  57. ModuleNotFoundError: No module named '_sqlite3'
  58. [2021-01-04 05:24:00 +0000] [13884] [INFO] Worker exiting (pid: 13884)
  1. 参考:
  2. https://stackoverflow.com/questions/51081994/while-installing-nltk-package-getting-modulenotfounderror-no-module-named-sql
  1. [root@jalen ~]# yum install sqlite-devel
  2. [root@jalen ~]# cd Python-3.8.6
  3. [root@jalen ~]# sudo ./configure --enable-optimizations
  4. [root@jalen ~]# sudo make altinstall
  5. [root@jalen ~]# virtualenv -p /usr/local/bin/python3.8 venv3
  6. [root@jalen ~]# source ./venv3/bin/activate
  7. [root@jalen ~]# pip install -r provision/requirements.txt

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/587184
推荐阅读
相关标签
  

闽ICP备14008679号