Psychopy3.6 not running

OS : Windows 10
PsychoPy version : Psychopy 3.6

I was trying to install the latest version of Psychopy 3.6 hoping that some new slider/rating features may help design my new experiment. However, psychopy could not run after reinstalling and I got error message as follows:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\Lib\site-packages\psychopy\app\psychopyApp.py”, line 104, in
main()
File “C:\Program Files\PsychoPy3\Lib\site-packages\psychopy\app\psychopyApp.py”, line 100, in main
start_app()
File “C:\Program Files\PsychoPy3\Lib\site-packages\psychopy\app\psychopyApp.py”, line 28, in start_app
app = PsychoPyApp(0, showSplash=showSplash)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app_psychopyApp.py”, line 226, in init
self.onInit(testMode=testMode, **kwargs)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app_psychopyApp.py”, line 416, in onInit
logging.flush()
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\logging.py”, line 300, in flush
logger.flush()
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\logging.py”, line 286, in flush
target.write(formatted[thisEntry] + ‘\n’)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\logging.py”, line 206, in write
stream.write(txt)
File “C:\Program Files\PsychoPy3\lib\encodings\cp1252.py”, line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: ‘charmap’ codec can’t encode characters in position 103-107: character maps to

Psychopy closes automaticaly after I click on the ok button on the error message, and I have deleted the appData.cfg file, checked the userPrefs.cfg as instructed on the troubleshooting website and none of these work. It also suggested I change the python appropriate to the Psychopy, but I don’t really know how to do this.

Your help is much appreciated!

It definitely looks like there’s something in a package which PschoPy isn’t getting on with.

The simplest solution is to try upgrading your version of PsychoPy to 2020.2.4. 3.6 is actually the version of Python you’re running on, so your PsychoPy may not be the most recent. If it is, or if this doesn’t work, you could try uninstalling and reinstalling all your packages. You can do this using the Command Prompt in Windows:

  1. Find Command Prompt in your start menu, right click and choose “Open As Administrator”
  2. type cd C:\Program Files\PsychoPy3\Lib\site-packages to go to your site-packages directory
  3. type pip freeze > killList.txt to store a list of all installed packages (and their version numbers) in a text file
  4. type pip list > requirements.txt to store a list of all installed packages (sans version numbers) in a text file
  5. type pip uninstall -r killList.txt -y to uninstall everything in killList.txt
  6. type pip install -r requirements.txt to reinstall the latest version of everything

Thank you so much for your reply TParsons!
I tried copying the script that on cmd but I got an error message stating
‘pip’ is not recognized as an internal or external command,
operable program or batch file.

I have also tried to uninstall PsychoPy 3.6 and reinstall it through control panel but it didn’t work out. Do you know if there is any other way to update the Python version?

Thanks again.

Best,
Cuici

That pip error usually means you’re not in the correct folder - what does the cmd window return if you enter cd?

Here are the window returns when I type the first two scripts as suggested and lastly with only cd as requested, hope this is what you are looking for.

C:\WINDOWS\system32>cd C:\Program Files\PsychoPy3\Lib\site-packages

C:\Program Files\PsychoPy3\Lib\site-packages> pip freeze > killList.txt
‘pip’ is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files\PsychoPy3\Lib\site-packages>cd
C:\Program Files\PsychoPy3\Lib\site-packages

C:\Program Files\PsychoPy3\Lib\site-packages>

Thanks again for your help!

So that’s definitely the correct location… Meaning pip doesn’t seem to be installed in your site-packages folder. In which case you should download the file get-pip.py from here to your site-packages folder:


and then run it using:
python get-pip.py while in that folder

then try again, hopefully once you have pip set up the original solution should work!