|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
还是无法识别.jpg格式
>>> g.buttonbox('大家说我长得帅吗?', image=r'C:\Users\sjk\Pictures\Saved Pictures\1.jpg', choices=('帅', '不帅', '!@#$%'))
Cannot load C:\Users\sjk\Pictures\Saved Pictures\1.jpg. Check to make sure it is an image file.
PIL library isn't installed. If it isn't installed, only .gif files can be used.
可以识别.png格式
g.buttonbox('大家说我长得帅吗?', image=r'C:\Users\sjk\Pictures\Saved Pictures\2.png', choices=('帅', '不帅', '!@#$%'))
这是我的安装步骤
C:\Users\sjk>pip install Pillow -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting Pillow
Downloading https://pypi.tuna.tsinghua.edu.c ... cp38-cp38-win32.whl (1.8 MB)
|████████████████████████████████| 1.8 MB 3.3 MB/s
Installing collected packages: Pillow
Successfully installed Pillow-7.2.0
C:\Users\sjk>python -m pip install pillow -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: pillow in d:\program files (x86)\python\lib\site-packages (7.2.0)
C:\Users\sjk>
为什么安装 了PIL 还是无法识别.jpg格式?是我安装的有问题还是少输入了什么命令?新手求助
|
|