Not able to import visual, sound, core from psychopy: (from psychopy import visual, sound, core)

I am trying to generate the EEG trigger through python. I am using the psychopy library, but facing some issues:

from psychopy import visual, sound, core
Traceback (most recent call last):

File “”, line 1, in
from psychopy import visual, sound, core

File “”, line 971, in _find_and_load

File “”, line 951, in _find_and_load_unlocked

File “”, line 890, in _find_spec

File “”, line 864, in _find_spec_legacy

File “C:\Users\sxa177330\AppData\Local\Continuum\anaconda3\lib\site-packages\pyximport\pyximport.py”, line 253, in find_module
fp, pathname, (ext,mode,ty) = imp.find_module(fullname,package_path)

File “C:\Users\sxa177330\AppData\Local\Continuum\anaconda3\lib\imp.py”, line 271, in find_module
“not {}”.format(type(path)))

RuntimeError: ‘path’ must be None or a list, not <class ‘_frozen_importlib_external._NamespacePath’>

If you have a suggestion please look into the issue. I am kind of new to python and anaconda(so many dependency libraries).

Thanks in advance,
Satnam