apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.62k stars 13.82k forks source link

Was unable to import superset Error: No module named 'pysqlite2' #2217

Closed sundaytok closed 7 years ago

sundaytok commented 7 years ago

I was failed install the superset-0.15.4 at the step “fabmanager create-admin --app superset” with error log :

(venv) [root@qa-javaserver-21 ecjava]# fabmanager create-admin --app superset
/home/ecjava/venv/lib/python3.4/importlib/_bootstrap.py:1161: ExtDeprecationWarning: Importing flask.ext.sqlalchemy is deprecated, use flask_sqlalchemy instead.
  spec.loader.load_module(spec.name)
Username [admin]: admin
User first name [admin]: admin
User last name [user]: admin
Email [admin@fab.org]: 736801943@qq.com
Password: 
Repeat for confirmation: 
/home/ecjava/venv/lib/python3.4/importlib/_bootstrap.py:1161: ExtDeprecationWarning: Importing flask.ext.script is deprecated, use flask_script instead.
  spec.loader.load_module(spec.name)
**Was unable to import superset Error: No module named 'pysqlite2'**

(venv) [root@qa-javaserver-21 ecjava]# python -V Python 3.4.6 how can I fix it?

xrmx commented 7 years ago

You are using a python built without the embedded sqlite3 module, you can install pysqlite2 as the error suggests or just use a proper built python.

wffger commented 6 years ago

pip install pysqlite3

Collecting pysqlite3 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/0a/5d/e5c0b27142c554dbbefd7bac061cb26a57297794762089759852bc23b76c/pysqlite3-0.1.0.tar.gz Installing collected packages: pysqlite3 Running setup.py install for pysqlite3 ... done Successfully installed pysqlite3

I still get the same prompt: Was unable to import superset Error: No module named 'pysqlite2'

mistercrunch commented 6 years ago

Related: https://github.com/jupyterhub/jupyterhub/issues/464

Looks like you need sqlite os C bindings as in sqlite-devel depending on your OS. What OS are you on?

BTW 0.15.4 is super old.

wffger commented 6 years ago

[root@devn ~]# cd /opt/python-env/Superset/
[root@devn Superset]# source ./bin/activate (Superset) [root@devn Superset]# pip -V pip 9.0.3 from /opt/python-env/Superset/lib/python3.4/site-packages (python 3.4) (Superset) [root@devn Superset]# python -V
Python 3.4.8
(Superset) [root@devn Superset]# pip show superset
Name: superset
Version: 0.23.3
Summary: A interactive data visualization platform build on SqlAlchemy and druid.io
Home-page: https://github.com/airbnb/superset
Author: Maxime Beauchemin Author-email: maximebeauchemin@gmail.com License: Apache License, Version 2.0 Location: /opt/python-env/Superset/lib/python3.4/site-packages Requires: boto3, celery, colorama, cryptography, flask, flask-appbuilder, flask-cache, flask-migrate, flask-script, flask-sqlalchemy, flask-testing, flask-wtf, flower, future, python-geohash, humanize, gunicorn, idna, markdown, pandas, parsedatetime, pathlib2, polyline, pydruid, PyHive, python-dateutil, pyyaml, requests, simplejson, six, sqlalchemy, sqlalchemy-utils, sqlparse, thrift, thrift-sasl, unidecode, bleach

wffger commented 6 years ago

Reinstall Python, remember use sudo make && sudo make altinstall. After that, I can go ahead.