简体   繁体   English

无法在 jupyter 笔记本中导入 package

[英]Unable to import the package in jupyter notebook

I am unable to import the package in the conda env inside jupyter notebook.我无法在 jupyter notebook 的 conda env 中导入 package。 在此处输入图像描述

I can import the package via terminal but it's not loading in the notebook.我可以通过终端导入 package,但它没有加载到笔记本中。

Can someone help me to debug this?有人可以帮我调试吗?

Update: Tried to add site-packages to path as well as per the suggestions by @Azhar更新:尝试将站点包添加到路径以及@Azhar 的建议在此处输入图像描述

I had a same problem.我有同样的问题。 Solution for me was:对我来说解决方案是:

  1. In jupyter print "%pip install lasio"在 jupyter 中打印“%pip install lasio”
  2. Reset the kernel and start again重置kernel,重新开始

That's all.就这样。 By the way, vie conda it didn't work.顺便说一句,vie conda 它没有用。 Good lick!舔得好!

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM