推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
mingyun
V2EX  ›  Python

Python 错误 ImportError: cannot import name 'VERSION'

  •  
  •   mingyun · Nov 26, 2017 · 5412 views
    This topic created in 3104 days ago, the information mentioned may be changed or developed.

    win7 py3

    >>> from PIL import Image
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "D:\python3\lib\site-packages\PIL\Image.py", line 27, in <module>
        from . import VERSION, PILLOW_VERSION, _plugins
    ImportError: cannot import name 'VERSION'
    >>> import PIL#这个能导入的
    >>> dir(PIL)
    ['__doc__', '__loader__', '__name__', '__package__', '__path__', '__spec__']
    
    mingyun
        1
    mingyun  
    OP
       Nov 26, 2017
    解决了
    $ pip install -U pillow
    Collecting pillow
    Using cached Pillow-4.3.0-cp35-cp35m-win32.whl
    Requirement already up-to-date: olefile in d:\python3\lib\site-packages (from pi
    llow)
    Installing collected packages: pillow
    Found existing installation: Pillow 4.2.1
    Uninstalling Pillow-4.2.1:
    Successfully uninstalled Pillow-4.2.1
    Successfully installed pillow-4.3.0
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   971 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 19:32 · PVG 03:32 · LAX 12:32 · JFK 15:32
    ♥ Do have faith in what you're doing.