-1

I am trying to install openpyxl 2.4.1 on Python 3.5.2 using pip. I tried running the code below in both Windows' Command Prompt and the Python 3.5 Desktop app created when I installed the software:

python pip install openpyxl

I also tried

pip install openpyxl

Error I receive from cmd.exe:

C:\Users\'username'>pip install openpyxl
'pip' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\'username'>python pip install openpyxl
'python' is not recognized as an internal or external command,
operable program or batch file.

I think the issue is that I'm using my employer laptop so the file path is different; i.e. instead of C:\Python35\...; mine is C:\Users\'username'\AppData...\Programs\Python 3.5

Could this be my problem, and, if so, how do I fix it?

Thanks.

  • 1
    That shouldn't be a problem. What was the error message when you tried `pip install openpyxl`? That is the correct command. – mprat Dec 21 '16 at 18:21
  • @mprat >>> pip install openpyxl File "", line 1 pip install openpyxl ^ SyntaxError: invalid syntax >>> – iStillHaveToGoPee Dec 21 '16 at 18:22
  • 1
    Sorry I was not specific enough. You have to type that into the windows command prompt, not the Python Desktop app. – mprat Dec 21 '16 at 18:24
  • Python version 3.x.x has lots of issue with ref to installing packages so the packages which worked with older versions might throw error while trying to installing it in python 3.x.x – RAJA THEVAR Dec 21 '16 at 18:27
  • @mprat apologies, I just updated the question with the error i receive from cmd.exe. – iStillHaveToGoPee Dec 21 '16 at 18:29
  • @RAJATHEVAR have you seen any resolutions? the guide I'm using uses 3.x.x and my only goal is to automate excel tasks. – iStillHaveToGoPee Dec 21 '16 at 18:29
  • Ok, it means you don't have pip installed on your machine. This SO post actually has a step-by-step guide for how to install pip: http://stackoverflow.com/questions/4750806/how-do-i-install-pip-on-windows then use it. – mprat Dec 21 '16 at 18:34
  • You can use any of the package mentioned in the following url http://www.python-excel.org/ – RAJA THEVAR Dec 21 '16 at 18:35

1 Answers1

4

You're trying to run pip in the Python interpreter, while you should run it in the terminal (i. e. cmd.exe).

ForceBru
  • 36,993
  • 10
  • 54
  • 78
  • I tried using both because I wasn't sure why it wasn't working. Updated the question with the error I get from cmd.exe – iStillHaveToGoPee Dec 21 '16 at 18:27
  • @iStillHaveToGoPee, now this is a different question... [This](https://docs.python.org/3/installing/) is what the Python docs says about installing modules on different platforms, including Windows. – ForceBru Dec 21 '16 at 18:31
  • yes... I've read through the install guide but it does not address this issue. I have followed the guide to the letter but cmd.exe still doesn't recognize Python or pip as valid commands – iStillHaveToGoPee Dec 21 '16 at 19:44