I am trying to install psychopy module in Python anaconda spyder 32 bit. I have tried with pip install psychopy. Since it is company’s laptop it did not worked out well. Then I have tried to do it with proxy like ‘pip --proxy (IP add) install psychopy’. It got installed. When I tried to import various objects like core, data etc. It is showing me an import error like:
from psychopy import core, data, event, gui, visual ImportError: cannot import name core
Here is the code.
import serial from time import sleep import struct from psychopy import core, data, event, gui, visual try: arduino = serial.Serial('COM8',19200) sleep(2) print("Connection to " + 'COM8' + " established succesfully!\n") except Exception as e: print(e) global command global win win = visual.Window(size=(1680, 1050), fullscr=True, screen=0, allowGUI=True, allowStencil=False, monitor='testMonitor', color=[0,0,0], colorSpace='rgb', blendMode='avg', useFBO=True, ) #TODO: handle in a different way the screen resolution instruction1 = visual.TextStim(win, text=u"""Press i to start!""") instruction2 = visual.TextStim(win, text=u"""Press e to stop!""") instruction3 = visual.TextStim(win, text=u"""Thank you!""") instruction1.draw() sleep (2) win.flip() if 'i' in event.waitKeys(): sleep (2) command = arduino.write(struct.pack('>B', 1)) instruction2.draw() win.flip() if 'e' in event.waitKeys(): sleep (2) command = arduino.write(struct.pack('>B', 0)) instruction3.draw() win.flip() win.close () arduino.close()
If I remove core from import, the next error will be data then event then GUI etc.
Can anyone help me to resolve this issue?