当前位置:网站首页>Reason for pilot importerror: cannot import name 'pilot_ Version 'from' PIL ', how to install pilot < 7.0.0
Reason for pilot importerror: cannot import name 'pilot_ Version 'from' PIL ', how to install pilot < 7.0.0
2022-07-27 10:04:00 【Redamancy06】
File “D:\Asoftware\Anaconda3\envs\3d_photo_stylization\lib\site-packages\torchvision\transforms\functional.py”, line 5, in
from PIL import Image, ImageOps, ImageEnhance, PILLOW_VERSION
ImportError: cannot import name ‘PILLOW_VERSION’ from ‘PIL’ (D:\Asoftware\Anaconda3\envs\3d_photo_stylization\lib\site-packages\PIL_init_.py)
Wrong explanation :torchvision Call... At run time PIL modular , call PIL Modular PILLOW_VERSION function . however PILLOW_VERSION stay Pillow 7.0.0 Later versions have been removed ,Pillow 7.0.0 Later versions use __version__ Function instead of PILLOW_VERSION function .
How to install pillow<7.0.0
First, go to the website to find the version suitable for your corresponding computer pillow package https://pypi.org/simple/pillow/

6.2.2 representative Pillow- edition ,cp37 representative python3.7 edition ,win_amd64 yes windows Under the version 64 The computer of bit
Method 1 . uninstall PIL modular , reinstall , install 7.0.0 Previous version , I have installed 6.2.2 edition , The command used is
pip install pillow==6.2.2

Method 2 : Use from PIL import Image, ImageOps, ImageEnhance, version In the replacement file from PIL import Image, ImageOps, ImageEnhance,PILLOW_VERSION This sentence .
To put it bluntly, it is to use __version__ Replace the original PILLOW_VERSION. Click Save to .
Then there is no wrong item
边栏推荐
- GO基础知识—数组和切片
- Review summary of engineering surveying examination
- Voice live broadcast system - Principles to be followed in developing push notifications
- Anchor free detector: centernet
- 吃透Chisel语言.22.Chisel时序电路(二)——Chisel计数器(Counter)详解:计数器、定时器和脉宽调制
- When I went to oppo for an interview, I got numb
- Interview Essentials: shrimp skin server 15 consecutive questions
- What happens if the MySQL disk is full? I really met you!
- WGAN、WGAN-GP、BigGAN
- Example of ICP registration for PCL
猜你喜欢

语音直播系统——开发推送通知需要遵守的原则

How does data analysis solve business problems? Here is a super detailed introduction

Interview Essentials: shrimp skin server 15 consecutive questions

3D修复论文:Shape Inpainting using 3D Generative Adversarial Network and Recurrent Convolutional Networks

How to use tdengine sink connector?

安装了HAL库如何恢复原来的版本

会议OA项目之会议排座功能&&会议送审的实现

省应急管理厅:广州可争取推广幼儿应急安全宣教经验

It's great to write code for 32 inch curved screen display! Send another one!

Why is redis so fast? Redis threading model and redis multithreading
随机推荐
[cloud native] how can I compete with this database?
At the end of the year, I'll teach you how to get high performance!
Qt | 关于Qt Creator打开项目编译不过的问题
I grabbed a ticket and thought I found the system bug of 12306
GBase 8a MPP集群扩容实战
After one year, the paper was finally accepted by the international summit
Snowflake vs. Databricks谁更胜一筹?2022年最新战报
Understand chisel language. 22. Chisel sequential circuit (II) -- detailed explanation of chisel counter: counter, timer and pulse width modulation
QT | about the problem that QT creator cannot open the project and compile it
电机控制器中的MOS驱动
S switch stacking scheme configuration guide
吃透Chisel语言.25.Chisel进阶之输入信号处理(一)——异步输入与去抖动
A ride into Qinchuan -- a brief talk on how beego Autorouter works
去 OPPO 面试,被问麻了
Food safety | the kitchen board environment is very important. Do you know these use details?
Towards the peak of life
Nacos configuration center dynamically refreshes the data source
直播倒计时 3 天|SOFAChannel#29 基于 P2P 的文件和镜像加速系统 Dragonfly
Example of ICP registration for PCL
QT learning (II) -.Pro file explanation