Whenever I try to run some Python Package which uses Psychopy module, I am getting the following error.
I am using Python 2.7 and Mac OS Sierra.
Traceback (most recent call last):
File "visuals.py", line 8, in <module>
from psychopy.visual import Window, Circle, ImageStim
File "/Users/divz/anaconda/lib/python2.7/site-packages/psychopy/visual/__init__.py", line 17, in <module>
from .window import Window, getMsPerFrame, openWindows
File "/Users/divz/anaconda/lib/python2.7/site-packages/psychopy/visual/window.py", line 64, in <module>
from .text import TextStim
File "/Users/divz/anaconda/lib/python2.7/site-packages/psychopy/visual/text.py", line 30, in <module>
from psychopy.visual.basevisual import BaseVisualStim, ColorMixin
File "/Users/divz/anaconda/lib/python2.7/site-packages/psychopy/visual/basevisual.py", line 20, in <module>
import Image
ImportError: No module named Image
Please help me figure out why I am getting this error. Is it related to installing anaconda?
OK. Image comes from the 3rd party library PIL (Python imaging library). Do you have that installed? i.e. it would be bundled with the standalone version of PsychoPy, but since you are running PsychoPy under your own Python (Anaconda), you’ll need to install that dependency yourself.
I am able to solve Image import error by uninstalling PIL and Pillow and again installing Pillow. But now I am facing this issue.
Could you please take a look and let me know why this error is caused?
Traceback (most recent call last):
File "Gazeindep.py", line 8, in <module>
from psychopy import Window
ImportError: cannot import name Window