ImportError: cannot import name '_imagingtk'

后端 未结 2 1020
遥遥无期
遥遥无期 2021-01-22 17:28

I am using Anaconda with python 3.4 and I am not able to get all the pillow packages I need I am afraid on Windows 8.1.

I installed pillow via the Anaconda console with:

相关标签:
2条回答
  • 2021-01-22 17:50

    You need tcl/tk library.

    Install them using apt-get

    Do sudo apt-get install tk8.6-dev tcl8.6-dev

    --Reference.

    0 讨论(0)
  • 2021-01-22 18:00

    I know this is not a complete answer, but I have had the same problem and spent a day trying to figure it out... Here is a small subset of things I tried yesterday to the best of my weak memory... -Tried upgrating to the latest Python environment using anaconda (tip: you can create one using

    conda update conda 
    conda update anaconda
    (I think that's it, but may have tried to make sure for key packages explicitly etc.)
    

    -Tried using Python 3.3 environment using anaconda (tip: you can create one using

    conda update conda 
    conda create -n py33 python=3.3 anaconda
    activate py33
    

    -Tried using PythonWin instead of anaconda (that one took some time, had to install packets like numpy manually...)

    -Tried updating / downgrading / installing/ uninstalling all kinds of different variations of Pillow, PIL, etc....

    -Tried using opencv instead of PIL, though did not try to write my own components...

    -Tried manually copying Tcl/tk and a few others to the lib directory as suggested by some posts

    -Tried using import tkinter instead of Tkinter, using import Image vs. form PIL import Image (and in general taking Image from PIL, or opencv, or Tkinter) and a lot of other similar changes to the point it fell I was doing silly things

    -...

    At the end, I googled a few pages about GUIs in python, and now I am using wx... I had to run

    conda install wxpython
    

    and that was it. I have to say that after all this, I am presently surprised by how easy it was to make it work, here is a code example...

    0 讨论(0)
提交回复
热议问题