psychopy.org | Reference | Downloads | Github

ModuleNotFoundError: No module named 'psychopy' [Details Inside]


#1

Hey, I’m new to Python and Psychopy but not really to programming. I’ve tried running the following:

print("foo")
from psychopy import visual, core, gui, event
print("bar")

Both from the command line and inside the Spyder IDE, I get the following error:

Traceback (most recent call last):
  File "test.py", line 2, in <module>
    from psychopy import visual, core, gui, event
ModuleNotFoundError: No module named 'psychopy'

System specs: macOS High Sierra v.10.13.4, Macbook Air

Python version: Python 3.7.1 (python -V)

I’ve installed the following dependencies: wxPython, pyo, and the ones in the following code:

pip install numpy scipy matplotlib pandas pyopengl pyglet pillow 
moviepy lxml openpyxl xlrd configobj pyyaml gevent greenlet 
msgpack-python psutil tables requests[security] pyosf cffi 
pysoundcard pysoundfile seaborn psychopy_ext python-bidi psychopy
pip install pyserial pyparallel egi iolabs
pip install pytest coverage sphinx

pip install pyobjc-core pyobjc-framework-Quartz

All from this resource. It seemed to run without a hitch (aside from some that didn’t like Spyder, but I ran it on the command line as well as Spyder, so that shouldn’t be a problem).

Any suggestions?


#2

Inside your Python site packages directory, did those libraries all get installed there?

And is Spyder configured to use that version of Python, and not your system-provided Python?