0

I am trying to install matplotlib into python27 but am running into issues with pip. As stated when I try any 'pip' command I get

'pip' is not recognized as an internal or external command.

I checked my path variables and they point to the location of my OSGeo4W Python27 install. get-pip.py works and it even says I am up to date on my pip install.

I am wondering if the issue is that I have more than one Python installed on my PC. Arc Desktop decided I needed C:\Python27 and C:\Python34 on top of the OSGeo4W install in the C:\OSGeo4W64\apps\Python27

Anyone know what the issue might be? Can I consolidate my python installs without breaking anything?

6
  • The pip executable is not in your path. Multiple installations shouldn't have anything to do with that. Make sure that the path contains the directory with the pip executable. Commented Jun 30, 2016 at 14:55
  • The path to the exe is there for the OSGeo4W install, and I have since discovered that pip works through the OSGeo4W shell but not the windows cmd. Maybe I need to add paths to the pip.exe for both the C:\Python27 and C:\Python34 for it to work in the windows cmd? Commented Jun 30, 2016 at 15:06
  • Try python -m pip instead. Commented Jun 30, 2016 at 15:08
  • You can also try import pip from within the Python interpreter. If it can't find it you know it's not there for the install you're running. If it can run it that way but not from the command line then your Python path is right but your system path is wrong. Commented Jun 30, 2016 at 15:18
  • Since you have both versions of python try specifics like pip2 or pip3 ! Commented Jun 30, 2016 at 15:22

1 Answer 1

1

You need to add C:\Python27\Scripts to your path as well. That is where the pip executable lives by default.

Also, remember to close and reopen your command shell after you change your path variable to make sure that the update is loaded.

Sign up to request clarification or add additional context in comments.

4 Comments

Yeah! That was it, I added the paths but didn't restart the cmd; after I opened the OSGeo4W shell and it was working. Just reopened my cmd and it seems to be working there now too. After all of that though I cannot install matplotlib with pip in windows apparently. The whl files they provide for some reason are not recognized by python. Oh well atleast I don't have to go through all this later when I want to install something else into python. Thanks!
I've got it installed on Windows in python27. I think I downloaded the whl file from this site: lfd.uci.edu/~gohlke/pythonlibs/#matplotlib It has builds for multiple architectures. Just download the one that suites your configuration.
And thank you again the whl file I got from there worked.
If this answered the question then you should accept it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.