IPython Notebook and SQL: "ImportError: without a module named sql" when starting "% load_ext sql"

Just configure IPython Notebook on Ubuntu 16.04, but I cannot use %load_ext sql . I get: ImportError: No module named sql

I tried using pip and pip3 with and without sudo to install ipython-sql. All 4 times it was installed without problems, but nothing changes on the laptop.

Thanks in advance!

+7
source share
2 answers

I know that this was a long time ago, but I ran into the same problem and Thomas's advice solved my problem. Just stating what I did here.

When I ran sys.executable on a laptop, I saw /usr/bin/python2 , and the pip I used to install the package was /usr/local/bin/pip (to find out that you are using pip , just do which pip or sudo which pip if you install packages throughout the system). So I reinstalled ipython-sql using the following command, and everything ipython-sql out just fine.

sudo -H /usr/bin/python2 -m pip install ipython-sql

This is odd since I always install my packages using pip . I'm wondering, maybe there is something special about magical functions in Jupyter.

+1
source

I doubt that you are using a different IPython Notebook kernel than the one in which you installed ipython-sql .
IPython Notebook can have more than one core. If so, first make sure you are in the right place.

0
source

All Articles