Reputation: 685
I have installed pip install ipython-sql
. I am trying to run
%load_ext sql
but it returns
The sql module is not an IPython extension.
How can I get sql running in ipython?
Upvotes: 7
Views: 10772
Reputation: 1
I reinstalled ipython-sql using the following command, and everything worked out.You are not saying you are running conda thus I am assuming you are simply using a python in jupyter-notebook. This worked for python versions 3.6.9
sudo -H python3 -m pip install ipython-sql
Seems as if this happened to me because I did not have access to pip's parent directory. (in my case I was in a virtual environment) attempting to make the normal pip install ipython-sql
which is why I used the -H
flag after sudo.
Upvotes: 0
Reputation: 445
Since you're using Anaconda's version of Python, make sure you install with conda, which is the relevant package manager. You'll need to install with the following command:
conda install -c conda-forge ipython-sql=0.3.6
Source: https://anaconda.org/conda-forge/ipython-sql
Upvotes: 0
Reputation: 1194
Is it possible that you are running a different version of python than you've installed the extension for? After you execute the ipython command, if the first line of output is something like:
Python 3.5.0 (default, Sep 14 2015, 02:37:27)
which indicates Python 3, rather than something like:
Python 2.7.11 (default, Feb 23 2016, 16:17:28)
which indicates Python 2, then you should try installing the extension using pip3
pip3 install ipython-sql
in order to make it available to the version of ipython that you are running.
Upvotes: 3