Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23276

Can't find '_sqlite3' module when import it using python which installed by pyenv

$
0
0

Installed python 3.7.0 by pyenv on macOS.

sqlite3 has been installed:

which sqlite3/usr/bin/sqlite3

Also tried to install pysqlite3 by pip:

pip install pysqlite3

But can't find module when import sqlite3:

In [1]: import sqlite3---------------------------------------------------------------------------ModuleNotFoundError                       Traceback (most recent call last)<ipython-input-1-5239c6be4108> in <module>----> 1 import sqlite3~/.pyenv/versions/3.7.0/lib/python3.7/sqlite3/__init__.py in <module>     21 # 3. This notice may not be removed or altered from any source distribution.     22---> 23 from sqlite3.dbapi2 import *~/.pyenv/versions/3.7.0/lib/python3.7/sqlite3/dbapi2.py in <module>     25 import collections.abc     26---> 27 from _sqlite3 import *     28     29 paramstyle = "qmark"ModuleNotFoundError: No module named '_sqlite3'

Is it necessary to install a develop library for sqlite3 on macOS by brew?


Viewing all articles
Browse latest Browse all 23276

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>