-2

I'm trying to install and use Pip, ultimately to install dateutil. I found in another thread that I should write

pip install python-dateutil

I get the error message "'pip' is not a recognized as an internal or external command, operable program or batch file."

Does this mean I should add something to a path? What should I add, and to what path?

user2536262
  • 281
  • 1
  • 7
  • 22

3 Answers3

3

First of all you should check the Python Scripts directory if there is pip is installed. You can find this at c:\Python27\Scripts\ folder. If pip is there in directory then added the scripts folder path to the environment's PATH. You will be able to execute the pip from anywhere throughout the system.

In other way, if pip is available in your scripts directory then go to scripts directory using "cd c:\puthon27\scripts" and use pip from there.

Also, if pip is not installed then you need to install the same.

Note: Change path as per the OS. Above process I mentioned for Windows OS and Python version is 2.7.

Billal Begueradj
  • 13,551
  • 37
  • 84
  • 109
Vinay
  • 325
  • 1
  • 8
2

If you are on windows:

  1. Press the windows button
  2. Right click 'computer'
  3. Click properties
  4. On the left top you see list of stuff, click on advanced system configuration
  5. Click system variables
  6. Go to path and add: ;c:\Python27\;C:\Python27\Scripts

Change it to your python path, ; is to start a new variable. Also some things I tell you to click on might have a different (but similar) name, I'm translating this from Dutch that's why :)

EpicKip
  • 3,645
  • 1
  • 17
  • 35
1

Depending on the Linux distro:
- Debian, Ubuntu...:

apt-cache search pip
// Will list matching .deb packages
apt-get install exact_name_of_the_package

- RedHat, CentOS, Fedora...:

yum search pip
// Will list matching .rpm packages
yum install exact_name_of_the_package

- OpenSUSE:

zypper search pip
// Will list matching .rpm packages
zypper install exact_name_of_the_package

All of these have to be installed as root.

In case you're running on Mac OSX, you may use Homebrew:

brew install python # that will install pip as well

Windows installation is described in here: How do I install pip on Windows?

Community
  • 1
  • 1
ElmoVanKielmo
  • 9,272
  • 2
  • 28
  • 41