0

I have been having a struggle with this. I am new to python programming and I would like to further my capabilities with other modules. I have read different websites and watched YouTube videos on installing modules with pip. None of it is either clicking with me or its not working. I am running python 3.7 which I downloaded from python.org. Where do I write the "pip install xxxxx" code? Everywhere I am typing it, I am getting a syntax error. Specifically I am wanting to install "openpyxl".

2 Answers2

1

You would be writing that in a command prompt. For instance, if you are on Windows, pressing the Windows button and typing "Command Prompt" will get you started. If you installed a recent version of Anaconda, you may have to use the "Anaconda Prompt" instead.

enter image description here

Note that this will only work if pip is located in a place pointed to by your PATH environment variable, so if the above fails, you may have to modify the variable.

fuglede
  • 17,388
  • 2
  • 54
  • 99
  • Thank you for the better direction. But I am seeing that " 'pip' is not recognized as a external or internal command". What do I do now? –  Aug 18 '18 at 20:50
  • This would indicate that either pip is not installed at all (which is probably unlikely) or that pip is installed but that the PATH variable does not contain the path to pip.exe (cf. the answer referred to above). You should be able to locate the executable somewhere around where you installed Python itself. – fuglede Aug 18 '18 at 20:59
  • If you manage to dig up `pip.exe` and would rather not have to deal with modifying path, what you can also do is open a command window in the folder containing the executable. The simplest way to do this in windows is to hold shift while right clicking the folder and choose "Open command window here". – fuglede Aug 18 '18 at 21:10
-1

I run the command in cmd in the directory that I want. If you use Anaconda you can use conda install openpyxl. And make sure that pip is installed. Run python and try to import pip to see if it exist. Hope it's useful.

Ali Safari
  • 87
  • 1
  • 1
  • 6