5

Just installed the iPython-SQL extenson, but when I run

%load_ext sql

I get an error "The sql module is not an IPython extension." I installed it via pip by

pip install ipython-sql

and when that didn't seem to work, even by downloading the file from Github and executing the code. Searching "The sql module is not an IPython extension." itself yielded 0 results in Google, so I am a little lost on what I might be doing wrong.

I am running OSX El Capitan (with SIS disabled), and my Python/iPython version is as below:

Python 2.7.10 |Anaconda 2.4.0 (x86_64)| (default, Oct 19 2015, 18:31:17) 
[GCC 4.2.1 (Apple Inc. build 5577)]
user2762934
  • 2,332
  • 10
  • 33
  • 39

4 Answers4

6

Since you're using Anaconda's Python, make sure you install with the associated package manager conda:

conda install -c conda-forge ipython-sql=0.3.6

Source: https://anaconda.org/conda-forge/ipython-sql

haudarren
  • 425
  • 1
  • 4
  • 12
4

I was getting the error on a notebook that no module named no module named sql. I did pip install python-sql and it then it gave the same error you had. I used %reload_ext sql instead of %load_ext sql and it seems to be working. Maybe it will work for you.

0

In my case the problem was that I had a file called sql.py in my working folder...

Simas Joneliunas
  • 2,890
  • 20
  • 28
  • 35
J.B.
  • 111
  • 1
  • 2
0

If you are using Jupyter Lab use the command

 %pip install ipython-sql

to install ipython-sql and then try

 %load_ext sql

again

That works like a charm for me.

Auguste
  • 2,007
  • 2
  • 17
  • 25