1

I'm having trouble installing the regex module for python, and would appreciate any suggestion and help. When I used "pip install" on a Windows system, the following error shows up:

Can't locate pip.pm in @INC <@INC contains: C:/Perl64/site/lib C:/Perl64/lib .) at C:\pathA\pathB\perl\bin/pip line 5. BEGIN failed--compilation aborted at C:\pathA\pathB\perl\bin/pip line 5.

All I did previously is to install pip, following this post: How do I install Python libraries?

I succeeded in the following steps:

python ez_setup.py
python get-pip.py

but not:

pip install setuptools --upgrade

that is when I got the errors.

I am not familiar with using python on Windows, but I need to do it this time. Seems like there is another pip installed for perl on this computer, but when I check the environment variables, I can't really see anything about pip.

For your information -- the python version is: 2.7.7 |Anaconda 2.0.1 (64-bit)| (default, Jun 11 2014, 10:40:02) [MSC v.1500 64 bit (AMD64)]

Thanks a lot in advance for your help!

Community
  • 1
  • 1
Helene
  • 837
  • 2
  • 10
  • 19
  • 1
    Try following the instructions [here](http://stackoverflow.com/q/4750806/1426065) instead. – MattDMo Feb 12 '15 at 19:49
  • 1
    you seem to use `anaconda`. You can use `conda install pip` and `conda install setuptools` instead. Also `python -m pip install setuptools --upgrade` will probably work for you. – cel Feb 12 '15 at 20:22
  • Thank you MattDMo, I should just ask where to locate pip -- soon after I changed the environment variable as indicated in that post, pip works. And thank you @cel, I was able to find correct pip under the Anaconda folder! Problem solve:) – Helene Feb 12 '15 at 21:30

1 Answers1

2

Apparently Perl also has a tool named pip. Your PATH variable contains the directory for Perl's pip before the one containing Python's pip. You need to find the location of Python's pip and run it directly using an absolute path or edit the PATH variable for Windows so that the directory containing Python's pip is before the directory containing Perl's pip.

Code-Apprentice
  • 69,701
  • 17
  • 115
  • 226
  • Hi there thank you for the answer - the question was really old and I almost forgot about it lol. Nonetheless I got a new computer and no longer use perl so this never happened again:) – Helene Jul 17 '17 at 21:23
  • @Helene I just ran into the same problem today and found a solution. I figured I might as well share. I do not think many people have both Perl and Python installed on the same machine. – Code-Apprentice Jul 17 '17 at 21:25