Search code examples
pythonpython-2.7loggingpsychopy

Importerror: cannot import name logging


I am using Psychopy 1.83.03, 32 bit and python anaconda 2.7 64 bit on windows 10 64 bit.

When I am trying to import core, data, event, gui, and visual, it gives me an import error. Below is the code and the error traceback.

from __future__ import division, print_function
from win32api import GetSystemMetrics
import numpy as np
import os

from psychopy import core, data, event, gui, visual 
import qmix
import cv2
import threading
#import time
import datetime
#from timeit import default_timer as timer
#import xlwt
#import xlsxwriter
#import openpyxl
Traceback (most recent call last):

File "<ipython-input-37-f571478c27e1>", line 20, in <module>
from psychopy import core, data, event, gui, visual

File "C:\Users\ravikumar.mevada\Anaconda2\lib\site-packages\psychopy\event.py", line 57, in <module>
from psychopy import logging

ImportError: cannot import name logging    

Solution

  • This will install it in its own Python version folder:

    python3.6 -m pip install pakage-name