ImportError: cannot import name '_imaging' from 'PIL' (D:\install\Anaconda\envs\pytorch\lib\site-packages\PIL\__init__.py)
时间: 2023-09-01 07:12:26 浏览: 680
Mamba selective-scan-cuda-linux-gnu.so 用此编译好的文件进行替换即可
这个错误通常是由于PIL库的版本与当前Python版本不兼容所导致的。解决这个问题的方法有两种:
首先,可以尝试安装旧版本的Pillow库。这可以通过以下命令来实现:
pip install pillow==7.0.0 --user
这将安装Pillow库的旧版本,并可能解决导入错误的问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [ImportError:cannot import name ‘_imaging‘ from ‘PIL‘ python错误解决。pillow版本问题](https://blog.csdn.net/xlxt_/article/details/114794537)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [学习过程的小bug-ImportError: cannot import name ‘_imaging‘ from ‘PIL](https://blog.csdn.net/weixin_57397476/article/details/123236716)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文