Adding external python modules

Hi there,

we need to install scikit-learn and other libraries as additional python modules, however I have tried in many different ways and cannot get it to work.

  1. Download a copy of the package for Python 3.6 and adding the folder to the path of PsychoPy as suggested in the link below does not work
    https://www.psychopy.org/recipes/addCustomModules.html
  2. Manually copying the library files it into the lib/ folder of the python standalone installation does not work
  3. The option of using conda env create -n psychopy -f psychopy-env.yml does not work in the latest release of Psychopy (neither with Mojave nor with Catalina OSx), the application does not even launch on my mac.
    Using this I could easily add the python library within the conda environment
  4. I have also tried previous versions of Psychopy using the developer tools, installing from source, but no luck.

Currently I can only run Psychopy using the standalone version but this is not sufficient for me,

are there any plans to make the conda env create -n psychopy -f psychopy-env.yml to work again on the mac platform?

I hope this is not much of a hassle and any help will be much appreciated!!

cheers
david

  1. Could you expand on “does not work”? Is there an error message that might inform us what’s wrong?
  2. As above
  3. When it does not launch, is there an error message?
  4. … you get the idea. We can’t debug “it doesn’t work”

I personally use Framework python downloaded fom Python.org and then I do pip install psychopy (make sure it’s the right python since you’ve obviously got several)

Thanks Jon for the response and sorry for not being more specific. I’ll comment here on the installation using the psychopy-env.yml, which is the most straighforward and one of the most recommended in the documentation. Six months ago it was working fine.
I removed the env and reinstalled it a few weeks ago and it does not work anymore. Psychopy does not even launch. I activate the conda env and then hit psychopy in the terminal. It just gets stuck, no error or anything appears in the terminal.
Can you help re: this?
thanks!
david

Sorry, without a message that’s really not going to be easy to debug remotely

Hi Jon, OK I have now opened the Console in my mac and checked for any message popping just when I enter psychopy in the Terminal. As I said the terminal shows nothing
but I could see that the Console systematically gives this message

default 23:12:30.914288 +0200 taskgated MacOS error: -67062

and I have also noticed that the same error comes up after I activate the conda environmente with conda activate psychopy

I did not find any information on what this error may mean

hope this is somehow useful!! as I said it happened in latest release but not in the past from march april

thanks for your help!

david

Hi Jon, sorry to chase on this.

I’ve tried again the installation with the latest Psychopy release using the psychopy-env.yml and still gives this default 23:12:30.914288 +0200 taskgated MacOS error: -67062 I can see from the Console

Then I decided to give pip a try. I am using Catalina, I created a conda env with python 3.6 and then did pip. When I launch Psychopy I get this error message…Is there anything that could be done to solve this?

thanks for your time!

best
david

File “/Users/david_soto/miniconda3/envs/psychopy/bin/psychopy”, line 8, in
sys.exit(main())
File “/Users/david_soto/miniconda3/envs/psychopy/lib/python3.6/site-packages/psychopy/app/psychopyApp.py”, line 93, in main
stderr=True)
File “/Users/david_soto/miniconda3/envs/psychopy/lib/python3.6/site-packages/psychopy/core.py”, line 153, in shellCall
encoding=encoding, env=env)
File “/Users/david_soto/miniconda3/envs/psychopy/lib/python3.6/subprocess.py”, line 729, in init
restore_signals, start_new_session)
File “/Users/david_soto/miniconda3/envs/psychopy/lib/python3.6/subprocess.py”, line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘/Users/david_soto/miniconda3/envs/psychopy/bin/pythonw’: ‘/Users/david_soto/miniconda3/envs/psychopy/bin/pythonw’