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!

3
  • 1
    Try following the instructions here instead. Commented Feb 12, 2015 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. Commented Feb 12, 2015 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:) Commented Feb 12, 2015 at 21:30

2 Answers 2

3

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.

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

2 Comments

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 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.
0

The answers is perfect. Just a addon: you can do that by

  1. Right click on the start button
  2. Go to system> Advanced system settings> Environment Variables
  3. In system variables select path and then click on edit
  4. Reorder paths so that C:\Python27 entry comes before the perl\bin entry
  5. Save your changes by clicking ok

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.