Patrick ONeill Patrick ONeill - 7 months ago 24
Perl Question

error when installing python packages with PIP

Whenever I try to install a python package I get the following error.

C:\Python27>pip install pyaardvark

C:\strawberry\perl\bin/pip: Perl lib version (5.22.0) doesn't match executable '
C:\strawberry\perl\bin\perl.exe' version (5.16.3) at C:/strawberry/perl/lib/Conf
ig.pm line 62.
Compilation failed in require at C:/strawberry/perl/lib/Errno.pm line 8.
BEGIN failed--compilation aborted at C:/strawberry/perl/lib/Errno.pm line 8.
Compilation failed in require at C:/strawberry/perl/lib/File/Temp.pm line 148.
BEGIN failed--compilation aborted at C:/strawberry/perl/lib/File/Temp.pm line 14
8.
Compilation failed in require at C:/strawberry/perl/vendor/lib/pip.pm line 6.
BEGIN failed--compilation aborted at C:/strawberry/perl/vendor/lib/pip.pm line 6
.
Compilation failed in require at C:\strawberry\perl\bin/pip line 5.
BEGIN failed--compilation aborted at C:\strawberry\perl\bin/pip line 5.


Does anyone have any ideas??

Answer

In your PATH environment variable, your Perl directories likely preceed the Python ones, so when you call pip, it fires the pip binary located in your Strawberry Perl instance.

Try calling pip with its full path, eg: c:\python27\bin\pip. I don't have access to a Windows box at the moment, so that may not be the actual path and you'll have to find the actual location.