1

I use Jupyter Notebook from Anaconda 3 to run Python but unable to run certain Python code.

Below is the first cell of the Python code and the first 2 rows of the error: enter image description here

Below is the remaining error message: enter image description here

Summary of the error message (1st and last row): ModuleNotFoundError . . . No module named 'sql'

What am I missing here? I can run some simpler Python code but unable to run more complex ones.

I think the main difference between the 2 Python scripts is this: %load_ext sql This particular line of script is not in the simpler Python code.

PS Database is Oracle

2
  • It seems you need SQL.
    – user931000
    Commented Oct 24, 2018 at 23:20
  • @GabrielaGarcia thanks. Please refer to my own answer below. Thanks
    – Tone
    Commented Oct 31, 2018 at 0:50

2 Answers 2

2

My colleague has just resolved this issue for me.

I actually commented out this bit --> %load_ext sql and it ran but then we are not sure what it would affect and hence we resolved it properly.

Basically, open up the Anaconda Prompt and run pip install ipython-sql <-- this would install this module/thing required.

If you also come across issue related to cx_oracle. In the same command prompt and run pip install cx_oracle.

0

Try to install the module with "pip install", not "conda install". Then activate the conda venv.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .