Error installing Psychopy in Pycharm

I face an error when installing PsychoPy in Pycharm. I’m using pip install psychopy to install. I’m getting the following error :

Failed building wheels for pyWinhook. I’m using Python version 3.9 here. I tried the following solutions and have not been successful.

  1. I made sure Microsoft Visual C++ is installed on my machine. I have the Microsoft Visual C++ Distributable 2015-2019.
  2. I also installed swig and added it to the path in the environment variables in my machine.

It says the error was when installing the package pyWinhook. So, I was wondering if pyWinhook isn’t compatible with Python 3.9, and downgrading my Python version might solve it.

Any other recommendations would be highly appreciated. Thank you!

If your computer is win10,please refer to my article,may I help you

1 Like

Hi Wen,

I followed the instructions in the article you referred to. I was able to install Psychopy and was able to get Psychopy to run using Pycharm as well.

From my experience, I would advise against using pip to install Pyshopy. You might be getting compatibility issues. The best method is to install the standalone PSychopy version from the official website. This standalone version installs a Python interpreter and all other dependencies that are compatible with PsychoPy. This makes everything easier.

All we got to do is to make sure when we are creating a new project for programming for PsychoPy, we have to use the Python .exe file that is present in the PsychoPy installed folder :).

Thanks again, wen.
You’re are a lifesaver!

Some day I dream of being able to include the venv folder in the PsychoPy repo so that you can run in PyCharm with a pre-packaged environment, but as you discovered this method can be temperamental. Until then, installing via the standalone .exe is definitely the safest option :slight_smile:

2 Likes

I think pip install psychopy is not a good way. Beacuse it always is wrong

1 Like