简体   繁体   English

Jupyter Notebook ModuleNotFoundError->没有名为'sql'的模块

[英]Jupyter Notebook ModuleNotFoundError --> No module named 'sql'

I use Jupyter Notebook from Anaconda 3 to run Python but unable to run certain Python code. 我使用Anaconda 3的Jupyter Notebook运行Python,但无法运行某些Python代码。

Below is the first cell of the Python code and the first 2 rows of the error: enter image description here 以下是Python代码的第一个单元格和错误的前2行: 在此处输入图片描述

Below is the remaining error message: enter image description here 以下是剩余的错误消息: 在此处输入图片描述

Summary of the error message (1st and last row): ModuleNotFoundError . 错误消息摘要(第一行和最后一行):ModuleNotFoundError。 . . No module named 'sql' 没有名为“ sql”的模块

What am I missing here? 我在这里想念什么? I can run some simpler Python code but unable to run more complex ones. 我可以运行一些更简单的Python代码,但无法运行更复杂的代码。

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. 我认为这2个Python脚本之间的主要区别是:%load_ext sql这行特殊的脚本不在更简单的Python代码中。

Thanks guys! 多谢你们!

PS Database is Oracle PS数据库是Oracle

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. 我实际上注释掉了这一点->“%load_ext sql”,它运行了,但是我们不确定会影响什么,因此我们正确地解决了它。

Basically, open up the Anaconda Prompt and run "pip install ipython-sql" <-- this would install this module/thing required. 基本上,打开Anaconda Prompt并运行“ pip install ipython-sql” <-这将安装此模块/所需的东西。

If you also come across issue related to cx_oracle. 如果您还遇到与cx_oracle相关的问题。 In the same command prompt and run "pip install cx_oracle" 在同一命令提示符下,运行“ pip install cx_oracle”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ModuleNotFoundError:Jupyter Notebook 上没有名为“_tkinter”的模块 - ModuleNotFoundError: No module named '_tkinter' on Jupyter Notebook ModuleNotFoundError:在jupyter笔记本python中没有名为“可视化”的模块 - ModuleNotFoundError: No module named 'visualization' in jupyter notebook python Jupyter 笔记本:ModuleNotFoundError:没有名为“scipy”的模块 - Jupyter notebook: ModuleNotFoundError: No module named 'scipy' (Jupyter Notebook) ModuleNotFoundError: No module named 'pandas' - (Jupyter Notebook) ModuleNotFoundError: No module named 'pandas' ModuleNotFoundError:没有名为“pandas”的模块(jupyter notebook) - ModuleNotFoundError: No module named 'pandas' (jupyter notebook) ModuleNotFoundError:Jupyter Notebook 中没有名为“tensorflow”的模块 - ModuleNotFoundError: No module named 'tensorflow' In Jupyter Notebook ModuleNotFoundError:Jupyter Notebook 没有名为“keras”的模块 - ModuleNotFoundError: No module named 'keras' for Jupyter Notebook 进入 Jupyter 笔记本:ModuleNotFoundError:没有名为“podman”的模块 - Getting in Jupyter notebook: ModuleNotFoundError: No module named 'podman' ModuleNotFoundError:Jupyter Notebook 上没有名为“pandas”的模块 - ModuleNotFoundError: No module named 'pandas' on Jupyter Notebook ModuleNotFoundError:jupyter 笔记本中没有名为“deeppavlov”的模块 - ModuleNotFoundError: No module named 'deeppavlov' in jupyter notebook
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM