在木星笔记本上运行Python 3代码。想要建一张小木偶树地图。
当我运行代码时:
import squarify as sq
[医]
ModuleNotFoundError arrises.“没有名为‘squarify’的模块。”
虽然我知道有这样一个模块。
有人能帮我吗?
我试着把
path/to/python -m pip install squarify
和
install squarify
在牢房里,但没有用。
import squarify as sq的结果是:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-43-d5603c2d6e58> in <module>
6 #Put a title on the chart
7
----> 8 import squarify as sq
9
10 #determine count for each type weathersit
ModuleNotFoundError: No module named 'squarify'发布于 2019-09-26 19:02:58
谢谢你对这个问题的所有回答。从那以后我就想通了。我能给出的最好建议是在你的电脑上搜索Anaconda提示符(Anaconda 3),它会弹出一个脚本。然后简单的时间pip安装squarify。
一旦该程序加载到您的计算机上,尝试将squarify导入到您的jupyter笔记本上,并且这个块现在应该可以正常工作了。
祝大家好运,感谢你们的帮助!
扎克
发布于 2020-03-21 20:16:49
在我的例子中,squarify被添加到miniconda --我无法将它导入anaconda。我打开了Anaconda卸载的miniconda。更新anaconda并将squarify导入到anaconda (anaconda提示符),现在它通过简单的导入squarify cmd工作。
发布于 2021-12-12 17:43:44
对我来说,我打开了Anaconda,转到了环境基础(Root)并点击了Open终端。我在终端运行下面的命令,一切正常。
pip install squarifyhttps://stackoverflow.com/questions/58122032
复制相似问题