当尝试导入我以前点安装的PIL模块时,出现以下错误:
*{
margin: 0;
padding: 0;
}
html, body {
height: 100%;
}
.main-container {
width: 100%;
height: 100%;
background-image: url('link_to_your_image');
background-color: red;
display: flex;
flex-direction: row;
align-items: center;
}
.second-image, .text-area {
margin-left: 50px;
}
我的脚本在/ usr / local / bin / python3中运行,模块保存在/ usr / local / bin / pip3中。在终端中输入pip3 list时,似乎也存在“枕头”。 有办法解决该错误吗?可能是什么原因造成的?
代码的相关部分:
Traceback (most recent call last):
File "/Users/user1/Desktop/script.py", line 94, in <module>
from PIL import Image, ImageDraw, ImageFont
ImportError: No module named PIL