当前位置:网站首页>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-26 05:12: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
边栏推荐
- Your understanding of the "happen before principle" may be wrong?
- Recommend 12 academic websites for free literature search, and suggest to like and collect!
- 5个chrome简单实用的日常开发功能详解,赶快解锁让你提升更多效率!
- Nacos introduction and deployment
- Go-Excelize API源码阅读(六)—— DeleteSheet(sheet string)
- Nacos registry
- ALV report flow diagram
- DOM event flow event bubble event capture event delegate
- Compilation method of flood control evaluation report and flood modeling under the new guidelines
- Black eat black? The man cracked the loopholes in the gambling website and "collected wool" for more than 100000 yuan per month
猜你喜欢

Seata submits at details in two stages

Axi protocol (4): signals on the Axi channel

Simulation of future air pollution changes

nacos注册中心

【ACWing】1268. 简单题

Security permission management details

How many holes have you stepped on in BigDecimal?

Go-Excelize API源码阅读(六)—— DeleteSheet(sheet string)

MODFLOW flex, GMS, FEFLOW, hydraus practical application

地球系统模式(CESM)实践技术
随机推荐
【Leetcode】493. Reverse Pairs
Mathematical modeling and optimization analysis based on general optimization software gams
When AQS wakes up the thread, I understand why it traverses from the back to the front
Getting started with ALV
C语言力扣第41题之缺失的第一个正数。两种方法,预处理快排与原地哈希
[pytorch] install torch 1.8.1 and check whether torch version and GPU are available
kubernetes install completed
基于通用优化软件GAMS的数学建模和优化分析
AQS唤醒线程的时候为什么从后向前遍历,我懂了
MySQL master-slave synchronization and master-slave synchronization delay solution
Improve reduce parallelism in shuffle operation
JVM Lecture 5: how to deal with peak push of vertical and horizontal data
未来大气污染变化模拟
没背景、没学历?专科测试员进入互联网大厂是不是真的没希望?
Date and time function of MySQL function summary
异步时父子线程间的ThreadLocal传递问题
JVM第二讲:类加载机制
Why is the value represented by a negative number greater than an integer by 1?
Common solutions for distributed ID - take one
Embedded sharing collection 21