Installing psychopy in Pycharm fails

Hello, I’m trying to install Psychopy into Pycharm using pip install psychopy. My virtualenv uses python 3.6. However I get the following error message:

The problem seems to be the pyWinhook.

Installing collected packages: pyWinhook, python-vlc, python-gitlab, pyserial, pyqt5, pyqmix, pypiwin32, pyopengl, pyo, pyglet, pygame, psychtoolbox, psutil, openpyxl, opencv-python, msgp
ack-numpy, moviepy, jedi, javascripthon, glfw, gitpython, gevent, esprima, cryptography, astunparse, arabic-reshaper
Running setup.py install for pyWinhook … error
ERROR: Command errored out with exit status 1:
command: ‘c:\users\miria\pycharmprojects\pythonproject\venv\scripts\python.exe’ -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C:\Users\miria\AppData\Local\
Temp\pip-install-adnnsley\pywinhook_de09a896101e41008ff966819982e322\setup.py’"’"’; file=’"’"‘C:\Users\miria\AppData\Local\Temp\pip-install-adnnsley\pywinhook_de09a896101e41
008ff966819982e322\setup.py’"’"’;f = getattr(tokenize, ‘"’"‘open’"’"’, open)(file) if os.path.exists(file) else io.StringIO(’"’"‘from setuptools import setup; setup()’"’"’);code
= f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ install --record ‘C:\Users\miria\AppData\Local\Temp\pip-record-rszg_rx9\install-r
ecord.txt’ --single-version-externally-managed --compile --install-headers ‘c:\users\miria\pycharmprojects\pythonproject\venv\include\site\python3.6\pyWinhook’
cwd: C:\Users\miria\AppData\Local\Temp\pip-install-adnnsley\pywinhook_de09a896101e41008ff966819982e322
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\pyWinhook
copying pyWinhook\aa hook.py → build\lib.win-amd64-3.6\pyWinhook
copying pyWinhook\doc.py → build\lib.win-amd64-3.6\pyWinhook
copying pyWinhook\example.py → build\lib.win-amd64-3.6\pyWinhook
copying pyWinhook\HookManager.py → build\lib.win-amd64-3.6\pyWinhook
copying pyWinhook_init_.py → build\lib.win-amd64-3.6\pyWinhook
running build_ext
building ‘pyWinhook._cpyHook’ extension
swigging pyWinhook/cpyHook.i to pyWinhook/cpyHook_wrap.c
swig.exe -python -o pyWinhook/cpyHook_wrap.c pyWinhook/cpyHook.i
error: command ‘swig.exe’ failed: No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: ‘c:\users\miria\pycharmprojects\pythonproject\venv\scripts\python.exe’ -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C
:\Users\miria\AppData\Local\Temp\pip-install-adnnsley\pywinhook_de09a896101e41008ff966819982e322\setup.py’"’"’; file=’"’"‘C:\Users\miria\AppData\Local\Temp\pip-install-a
dnnsley\pywinhook_de09a896101e41008ff966819982e322\setup.py’"’"’;f = getattr(tokenize, ‘"’"‘open’"’"’, open)(file) if os.path.exists(file) else io.StringIO(’"’"‘from setuptools
import setup; setup()’"’"’);code = f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ install --record ‘C:\Users\miria\AppData\Local\T
emp\pip-record-rszg_rx9\install-record.txt’ --single-version-externally-managed --compile --install-headers ‘c:\users\miria\pycharmprojects\pythonproject\venv\include\site\python3.6\pyWin
hook’ Check the logs for full command output.

Any suggestions would be appreciated, thank you!

solved the error.

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ - Microsoft Q&A This solved the next error.