| Reference | Downloads | Github

Errors in Psychopy install using Anaconda

Hi all,
I am having trouble running Psychopy experiments via the command line in a MacBook Air, iOS version 10.14.6. I followed the install with Anaconda instructions on the Psychopy website, created a virtual env with python 3.5 etc. But when attempting to install the packages, I get the following error

$ conda install numpy scipy matplotlib pandas pyopengl pillow lxml openpyxl xlrd configobj pyyaml gevent greenlet msgpack-python psutil pytables requests[security] cffi seaborn wxpython cython pyzmq pyserial

Collecting package metadata (repodata.json): done
Solving environment: failed
Initial quick solve with frozen env failed.  Unfreezing env and trying again.
Solving environment: failed

Full traceback is here: (18.7 KB)

When I create the virtual env with my current version of python (3.7), I dont get the same install errors, but instead, come across the below when I try to run the .py script

$ python

pygame 1.9.6
Hello from the pygame community.
Traceback (most recent call last):
  File "/Users/talithaford/Dropbox/Work/Deakin/Projects/NeuroSPA/TMF/6. Testing/NeuroSPA_RME_task/", line 34, in <module>
    dlg = gui.DlgFromDict(dictionary=expInfo, sortKeys=False, title=expName)
TypeError: __init__() got an unexpected keyword argument 'sortKeys'
4.9181 	WARNING 	Import Error: No module named 'psychtoolbox'. Using event module for keyboard component.
(psypy3) 139-132-5-195:~ talithaford$ pip install psychtoolbox
Collecting psychtoolbox
  Using cached
Building wheels for collected packages: psychtoolbox
  Building wheel for psychtoolbox ( ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/talithaford/anaconda3/envs/psypy3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/gf/rfjg_hfd6750xc2rdyx3kvkm0000gn/T/pip-install-zi39hm6a/psychtoolbox/'"'"'; __file__='"'"'/private/var/folders/gf/rfjg_hfd6750xc2rdyx3kvkm0000gn/T/pip-install-zi39hm6a/psychtoolbox/'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);'"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/gf/rfjg_hfd6750xc2rdyx3kvkm0000gn/T/pip-wheel-o62yjgj1 --python-tag cp37
       cwd: /private/var/folders/gf/rfjg_hfd6750xc2rdyx3kvkm0000gn/T/pip-install-zi39hm6a/psychtoolbox/
  Complete output (220 lines):
  Platform reported as: Darwin

Again, full traceback is here: (143.7 KB)

I can install psychopy and run this experiment fine on an iMac desktop, with, from what I can tell, the same Anaconda install at the base and psychopy installation in the virtual envs.

Any insights would be great, thank you

There has been a drive recently to support a conda forge package of PsychoPy, led by Richard and @erik.kastman and I believe that has been completed. I think that was using Python 3.6 though - the dosc say 3.5 because that’s what used to work but I guess not any more.

BUT to have PsychoPy simply work, I really recommend that people use Standalone. I created that so that I wouldn’t have to help people with lots of different dependency issues. you can have a Standalone for PsychoPy as well as having a conda installation for other purposes and they won’t clash.

Thanks for the info Jon, I’ll look into it.

I had been using the GUI but was limited by some functions. I’ve just run the modified .py program through the coder view of the GUI though, and it works. So will run through that in future and not try from the terminal.

Thanks again,