zoukankan      html  css  js  c++  java
  • python3:安装后Pillow模块后,运行报错MytoduleNotFoundError: No module named 'PIL'

    解决方法
    卸载:pip3 uninstall pillow
    重新安装:python3 -m pip install pillow

    问题现象
    安装:pip3 install pillow
    Defaulting to user installation because normal site-packages is not writeable
    Collecting pillow
    Downloading Pillow-8.1.0-cp38-cp38-macosx_10_10_x86_64.whl (2.2 MB)
    |████████████████████████████████| 2.2 MB 7.6 kB/s
    Installing collected packages: pillow
    Successfully installed pillow-8.1.0

    运行程序:python3 transfer16to32bit.py
    Traceback (most recent call last):
    File “*", line 1, in
    from PIL import Image
    ModuleNotFoundError: No module named 'PIL'

    检查:pip3 install pillow
    Defaulting to user installation because normal site-packages is not writeable
    Requirement already satisfied: pillow in /Users/zhunix/Library/Python/3.8/lib/python/site-packages (8.1.0)

    产生原因
    系统中装有多个python版本,使用pip3安装时,装到了其他python版本的site-packages下。

  • 相关阅读:
    如何使用Log4j
    HDU 1114
    老鼠与毒药问题
    HDU 1065
    HDU 1301(MST)
    HDU 1078
    HDU 2159
    删除字符问题(贪心)
    正整数分解为几个连续自然数之和
    OpenJudge
  • 原文地址:https://www.cnblogs.com/zhunix/p/14463011.html
Copyright © 2011-2022 走看看