ModulenotFoundError:No模块名为' pygimli'
我在Jupyter笔记本上导入Pygimli时遇到困难。我按建议在
conda activate pg
因此,我相信它应该可以使用(我对obspy也这样做,它像魅力一样工作!)。
我找到了一个测试命令来查看安装是否正确:
python -c "import pygimli; pygimli.test(show=False, onlydoctests=True)"
根据命令,我会得到2个失败,但是我并没有真正遇到造成麻烦的原因,也没有得到解决问题的方法。这是我在终端上发生故障的两个屏幕截图:
href =“ https://i.sstatic.net/cejne.png” rel =“ nofollow noreferrer“>失败的第二个屏幕截图
I'm having trouble importing pyGIMLI on Jupyter Notebook. I installed it as recommended on https://www.pygimli.org/installation.html by creating a new environment and the installation went smoothly. However when I try to import it on Jupyter Notebook it cannot load it and I get : "ModuleNotFoundError: No module named 'pygimli'". I launch Jupyter using the terminal after typing the command :
conda activate pg
so I believe it should work (I do the same for Obspy and it works like a charm!).
I found a test command to see if the installation went correctly :
python -c "import pygimli; pygimli.test(show=False, onlydoctests=True)"
I get 2 failures according to the command, however I don't really get what's causing trouble, nor do I get how to solve the problem. Here are two screenshots of the failures I get on the terminal :
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚发现了问题是什么:我忘了在新环境中安装iPykernel。我可以使用以下问题解决我的问题:
对不起我的愚蠢问题,并感谢那些已经对我的Quesiton发表评论的人!
I just found out what the problem was : I forgot to install ipykernel in the new environment. I could solve my issue using :
Sorry for my dumb issue and thank you to those who already commented my quesiton!