无法在jupyter noteb中绘图导入

2024-04-19 03:58:43 发布

您现在位置:Python中文网/ 问答频道 /正文

把这个记在笔记本上(在antergos上):

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-8-6361d2547ebc> in <module>()
----> 1 import plotly

ModuleNotFoundError: No module named 'plotly'

从virtualenv的python解释器中尝试系统路径以及系统可执行文件在

^{pr2}$

我没有使用anaconda,但我使用的是virtualenv,按照以下指南设置:https://anbasile.github.io/programming/2017/06/25/jupyter-venv/通过运行“whichjupyter”指向virtualenv的本地文件来检查可执行文件。在这两种情况下,Pip freeze的输出似乎是相同的:

backcall==0.1.0
certifi==2018.4.16
chardet==3.0.4
decorator==4.3.0
GDAL==2.3.1
idna==2.7
ipykernel==4.8.2
ipython==6.4.0
ipython-genutils==0.2.0
jedi==0.12.1
jsonschema==2.6.0
jupyter-client==5.2.3
jupyter-core==4.4.0
nbformat==4.4.0
parso==0.3.1
pexpect==4.6.0
pickleshare==0.7.4
plotly==3.0.0
prompt-toolkit==1.0.15
ptyprocess==0.6.0
Pygments==2.2.0
python-dateutil==2.7.3
pytz==2018.5
pyzmq==17.1.0
requests==2.19.1
retrying==1.3.3
simplegeneric==0.8.1
six==1.11.0
tornado==5.1
traitlets==4.3.2
urllib3==1.23
wcwidth==0.1.7

重启内核似乎也无济于事。在


Tags: 可执行文件mostvirtualenv系统ipython笔记本jupyterplotly