使用错误:未找到行魔术函数`%sql`。

9

%reload_ext sql
%sql sqlite://

第二行无法编译,报告显示:UsageError: Line magic function %sql 未找到。使用Python3.8,jupyter notebook。


3
请尝试安装:pip install ipython-sql - Kinchit Dalwani
2个回答

3

我使用conda安装"ipython-sql"解决了这个问题,而不是使用PIP。

conda install -c conda-forge ipython-sql


2
加载SQL:
%load_ext sql

连接 SqlLite:

%sql sqlite://

4
我尝试了你的解决方案,但是出现了这个错误:"No module named 'sql'"。 - N.Elsayed

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接