Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"inconsistent use of tabs and spaces in indentation" from easy_install

I have had a strange error today when I tried to upgrade some of my python apps (aka pip and aws clt) and received the following error:

  File "/usr/bin/easy_install", line 31
    continue
           ^
TabError: inconsistent use of tabs and spaces in indentation

Then I tried running easy_install --version and received the same error. I have all three of my computers (Macbook Pro, iMac, and Mac Pro) running the same commands, only my Macbook Pro has this error (and all of them share the identical python version and apps). I like to know what might be the cause of this error message.

P.S. I have tried to copy the "/usr/bin/easy_install" file from one computer to another and received the same error message.

like image 540
Aero Wang Avatar asked Dec 17 '25 08:12

Aero Wang


2 Answers

This is really just my guessing. I have signed up for Apple Developer programer and used a beta test version of OS X. I then turned off the developer mode and returned to the ordinary Yosemite but the funny part is I cannot use easy_install afterward. I think turning off the developer mode is the same as turning off easy_install. I am not entirely sure if that is true but you can give it a try. Either reinstall the OS X, or simply turn the developer mode back on.

like image 126
James Wayne Avatar answered Dec 20 '25 00:12

James Wayne


I am not really an expert on this so please consider this with caution ;)

I also run into this error recently and I think it is due to having multiple versions of easy_install and(!) multiple versions of python available.

in my case I have the following versions available:

easy_install
easy_install-2.6
easy_install-2.7
easy_install-3.4

after running

sudo easy_install-2.7 pip

I was able to (re)-install pip.

notes:

  • easy_install launches #!/usr/bin/python
  • in my case /usr/bin/python is a symlink to version 3.4 of python
  • easy_install is probably written for python 2.x and fails with error "inconsistent use of tabs and spaces in indentation" when using python 3.x
like image 23
udo Avatar answered Dec 20 '25 00:12

udo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!