ImportError: openpyxl is required for loading excel format files

0 votes

I am using anaconda spyder 2.7 on windows 10 64 bit. I am also using psychopy software. There is an error coming which says openpyxl is required to load excel format files. I have installed openpyxl, but still there is a same error. I have also tried to modify the data.py line 29:

from 
openpyxl.cell import get_column_letter 
into:
openpyxl.utils import get_column_letter

but there is no difference. I am sending you the code and traceback. It would be really helpful if someone can solve this error.

base_dir =  os.path.normpath('C:\\Users\\ravikumar.mevada\\Gustometer\\qmix\\examples')
conditions_file = os.path.join(base_dir, 'fat_taste.xlsx')
data_dir = os.path.join(base_dir, 'Data_out_fat')
outfile = os.path.join(data_dir,'output_fat_taste')

#import .xlsx file
conditions = data.importConditions(conditions_file)

#screen resolution #TODO: not used
width = GetSystemMetrics(0) 
height = GetSystemMetrics(1)

#assign to each taste a specific pump
tastants_pumps = {'sweet1':pump_1,'sweet2':pump_3,'sweet3':pump_4, 'water':pump_5}
Traceback (most recent call last):

 File "<ipython-input-9-291e52893b5d>", line 7, in <module>
conditions = data.importConditions(conditions_file)

 File "C:\Users\ravikumar.mevada\Anaconda2\lib\site-packages\psychopy\data.py", line 2667, in importConditions
 raise ImportError('openpyxl is required for loading excel '

 ImportError: openpyxl is required for loading excel format files, but it was not found. 

Oct 3, 2018 in Python by eatcodesleeprepeat
• 4,670 points
33 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Forget the PsychoPy complications for the time time being, this just sounds like a problem with the installation of openpyxl. i.e. what happens with a python script that contains nothing but the line import openpyxl

If that doesn't work try re-installing it. It might work fine.
 

answered Oct 3, 2018 by Priyaj
• 56,120 points

Related Questions In Python

+1 vote
1 answer

What is the correct order to learn concepts in Python for machine learning?

Machine Learning is a vast domain. It ...READ MORE

answered Jul 25, 2018 in Python by ANMOL
• 3,620 points
31 views
0 votes
1 answer

What is the Python equivalent for a case/switch statement?

if x == 'a':  # Do the ...READ MORE

answered Jul 26, 2018 in Python by Priyaj
• 56,120 points
47 views
+1 vote
1 answer

What is the function for Factorial in Python

Easiest way: math.factorial(x) (available in 2.6 and ...READ MORE

answered Aug 21, 2018 in Python by Priyaj
• 56,120 points

edited Aug 21, 2018 by Omkar 57 views
+7 votes
8 answers

Difference for string comparison in Python: 'is' vs. ==

If we use "==" means both variables ...READ MORE

answered Sep 3, 2018 in Python by Parul Raheja
350 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 1,400 points
24 views
0 votes
1 answer

Why is openpyxl is required for loading excel format files?

Well, it sounds like openpyxl is not ...READ MORE

answered Aug 8, 2018 in Python by Priyaj
• 56,120 points
73 views
0 votes
1 answer

What is the flow control for “continue” in python?

This is the way "continue" statement works! You ...READ MORE

answered Jul 16, 2018 in Python by Priyaj
• 56,120 points
31 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.