I am very new to Python/programming, having recently installed Python 3.10. I have already installed the Openpyxl module, i.e. when I check on CMD I get this:
C:\Users\hadam>pip install openpyxl
Requirement already satisfied: openpyxl in c:\users\hadam\appdata\local\programs\python\python310\lib\site-packages (3.0.9)
Requirement already satisfied: et-xmlfile in c:\users\hadam\appdata\roaming\python\python310\site-packages (from openpyxl) (1.1.0)
I am trying to run some code which I have just copied from here (i.e. I have just edited the file path names): https://www.geeksforgeeks.org/python-how-to-copy-data-from-one-excel-sheet-to-another/
However, when I try to run this script (via the Mu editor), I get the following error message:
Traceback (most recent call last):
File "c:\users\hadam\appdata\local\programs\python\python310\scripts\test1.py", line 2, in <module>
import openpyxl as xl;
ModuleNotFoundError: No module named 'openpyxl'
>>>
Can anyone tell me why the Mu editor cannot find Openpyxl, or what I can do to execute this programme?
Thanks
Try to open python from the command line, e.g.
or
or
then when python is open
If the problem is not present anymore, your Mu editor might be using a different python interpreter/environment: check for its configurations and change it to the one you opened from the terminal.