简体   繁体   English

进口枕头,但我仍然得到“没有名为PIL的模块”

[英]Imported Pillow But I Still Get “No Module Named PIL”

I'm using python3 and I ran conda install pillow . 我正在使用python3,并且运行了conda install pillow When I run conda list I can see that it is installed. 运行conda list我可以看到它已安装。 In my jupyter notebook, however, I am getting the following error: 但是,在我的jupyter笔记本中,出现以下错误:

---> 10 from PIL import Image ---> 10从PIL导入图像

ModuleNotFoundError: No module named 'PIL' ModuleNotFoundError:没有名为“ PIL”的模块

I saw other posts on StackOverflow that said to use pip install pillow instead. 我在StackOverflow上看到了其他帖子,说使用pip install pillow代替。 I tried that but had the same results. 我尝试过,但结果相同。 Any help is appreciated! 任何帮助表示赞赏! Thanks~ 谢谢〜

I figured this out a while back but forgot to come back to the question. 我不久前就想出了这一点,但忘了回到这个问题。 Running conda install ipykernel nb_conda_kernels worked like a charm. 运行conda install ipykernel nb_conda_kernels就像一个conda install ipykernel nb_conda_kernels

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

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