当前位置:网站首页>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
边栏推荐
- Looking for a job for 4 months, interviewing 15 companies and getting 3 offers
- Understand chisel language. 27. Chisel advanced finite state machine (I) -- basic finite state machine (Moore machine)
- How to restore the original version after installing Hal Library
- Annotation and reflection
- 中高级试题」:MVCC 实现原理是什么?
- 活体检测综述
- Snowflake vs. Databricks谁更胜一筹?2022年最新战报
- 吃透Chisel语言.23.Chisel时序电路(三)——Chisel移位寄存器(Shift Register)详解
- Go Basics - arrays and slices
- 吃透Chisel语言.24.Chisel时序电路(四)——Chisel内存(Memory)详解
猜你喜欢

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

Understand chisel language. 22. Chisel sequential circuit (II) -- detailed explanation of chisel counter: counter, timer and pulse width modulation

蚂蚁集团境外站点 Seata 实践与探索

Concurrent Park and unpark description

LeetCode.814. 二叉树剪枝____DFS
[email protected]、$?、env看所有的全局变量值、set看所有变量"/>Shell变量、系统预定义变量$HOME、$PWD、$SHELL、$USER、自定义变量、特殊变量$n、$#、$*、[email protected]、$?、env看所有的全局变量值、set看所有变量

数据分析如何解决商业问题?这里有份超详细攻略

二叉树习题总结

flash闪存使用和STM32CUBEMX安装教程【第三天】

面试京东 T5,被按在地上摩擦,鬼知道我经历了什么?
随机推荐
WGAN、WGAN-GP、BigGAN
July training (day 21) - heap (priority queue)
GO基础知识—数组和切片
Food safety | the more you eat junk food, the more you want to eat it? Please keep this common food calorimeter
Dcgan paper improvements + simplified code
Engineering survey simulation volume a
2016 outlook
Qt 学习(二) —— Qt Creator简单介绍
刷题《剑指Offer》day04
Understand chisel language. 26. Chisel advanced input signal processing (II) -- majority voter filtering, function abstraction and asynchronous reset
GBase 8a MPP集群扩容实战
Provincial Emergency Management Department: Guangzhou can strive to promote the experience of emergency safety education for children
Qt 学习(二) —— .pro文件详解
二叉树习题总结
Food safety | are you still eating fermented rice noodles? Be careful these foods are poisonous!
Qt | 关于Qt Creator打开项目编译不过的问题
[scm] source code management - lock of perforce branch
In depth analysis, sub database and sub table are the most powerful auxiliary sharding sphere
吃透Chisel语言.26.Chisel进阶之输入信号处理(二)——多数表决器滤波、函数抽象和异步复位
超赞的卡尔曼滤波详解文章