Import "PIL" could not be resolved from source
时间: 2023-09-26 14:05:06 浏览: 58
As an AI language model, I don't have access to your system environment, so I can't give you specific instructions on how to resolve this issue. However, here are some general troubleshooting steps you can try:
1. Check if you have installed the "Pillow" library, which is a fork of the Python Imaging Library (PIL). You can install it using pip by running the following command in your terminal:
`pip install pillow`
2. Check if you have spelled "PIL" correctly in your code. It should be all uppercase:
`from PIL import Image`
3. Check if you are importing the library from the correct location. For example, if you are using a virtual environment, make sure you activate the environment before running your code.
4. If none of the above steps work, try uninstalling and reinstalling Pillow:
`pip uninstall pillow`
`pip install pillow`
If you are still having trouble, you may want to provide more information about your system and code so that someone can better assist you.
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)