-3

When I run my program from the command line, it errors stating that it can't find openpyxl, with the error:

ModuleNotFoundError: No module names 'openpyxl'

Any ideas on how to fix this?

-Thanks

EDIT: Using Python 3.6, I can run it fine from PyCharm, but when I can't run it from the cmd line.

Connor J
  • 540
  • 1
  • 6
  • 17

1 Answers1

1

Simply install openpyxl to your own computer by opening Command Prompt or Terminal, and typing:

pip install openpyxl # For Python 2
pip3 install openpyxl # For Python 3
Spasel Togalk
  • 99
  • 1
  • 3
  • 1
    This probably should have been a comment. There's tonnes of similar questions that could be used as a dupe; presumably they're installing to a different version of python than they get from the command line – roganjosh Aug 30 '18 at 09:14
  • Almost the right answer, but you made an honest attempt to answer the question so marked it correct for anyone that may have a similar issue in the future. The actual syntax I needed was `py -m pip install openpyxl`. (This is for windows 10) Thanks! – Connor J Aug 30 '18 at 09:27