TabError when installing python

This is the place for queries that don't fit in any of the other categories.

TabError when installing python

Postby RedEyedDog1 » Tue Oct 22, 2013 11:50 am


I need help with this error when using make for installing python.

Code: Select all
root@debian:/home/halo11/Desktop/Code/MOXA/Python-3.1# make
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g  -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include   -DPy_BUILD_CORE -o Modules/config.o Modules/config.c
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g  -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include   -DPy_BUILD_CORE -DPYTHONPATH='":plat-linux2"' \
      -DPREFIX='"/usr/local"' \
      -DEXEC_PREFIX='"/usr/local"' \
      -DVERSION='"3.1"' \
      -DVPATH='""' \
      -o Modules/getpath.o ./Modules/getpath.c
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g  -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include   -DPy_BUILD_CORE -DSVNVERSION="\"`LC_ALL=C echo Unversioned directory`\"" -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c
rm -f libpython3.1.a
ar rc libpython3.1.a Modules/getbuildinfo.o
ar rc libpython3.1.a Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/parsetok.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Parser/myreadline.o Parser/tokenizer.o
ar rc libpython3.1.a Objects/abstract.o Objects/boolobject.o Objects/bytes_methods.o Objects/bytearrayobject.o Objects/bytesobject.o Objects/cellobject.o Objects/classobject.o Objects/cobject.o Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/genobject.o Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/iterobject.o Objects/listobject.o Objects/longobject.o Objects/dictobject.o Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o Objects/object.o Objects/obmalloc.o Objects/capsule.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o Objects/unicodeobject.o Objects/unicodectype.o Objects/weakrefobject.o
ar rc libpython3.1.a Python/_warnings.o Python/Python-ast.o Python/asdl.o Python/ast.o Python/bltinmodule.o Python/ceval.o Python/compile.o Python/codecs.o Python/errors.o Python/frozen.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getplatform.o Python/getversion.o Python/graminit.o Python/import.o Python/importdl.o Python/marshal.o Python/modsupport.o Python/mystrtoul.o Python/mysnprintf.o Python/peephole.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pymath.o Python/pystate.o Python/pythonrun.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o Python/dtoa.o Python/formatter_unicode.o Python/dynload_shlib.o   Python/thread.o
ar rc libpython3.1.a Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o
ar rc libpython3.1.a Modules/_threadmodule.o  Modules/signalmodule.o  Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o  Modules/_weakref.o  Modules/_functoolsmodule.o  Modules/_localemodule.o  Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o  Modules/zipimport.o  Modules/symtablemodule.o  Modules/xxsubtype.o
ranlib libpython3.1.a
gcc -pthread  -Xlinker -export-dynamic -o python \
         Modules/python.o \
         libpython3.1.a -lpthread -ldl  -lutil   -lm 
  File "./", line 221
TabError: inconsistent use of tabs and spaces in indentation
make: *** [sharedmods] Error 1

I didnt even know compilers cared about tabs and spaces?

Thanks in advance.
Posts: 17
Joined: Thu Oct 10, 2013 11:21 am

Re: TabError when installing python

Postby tnknepp » Tue Oct 22, 2013 3:35 pm

If you are running debian you should already have Python.
Are you installing Python, or a Python module/package? You should be able to make use of the repository, e.g. sudo apt-get install python
Python: 2.7 via Anaconda
Numpy: 1.7
Pandas: 0.11
OS: Windows 7
IDE: Spyder/IPython
User avatar
Posts: 153
Joined: Mon Mar 11, 2013 7:41 pm

Re: TabError when installing python

Postby micseydel » Tue Oct 22, 2013 6:08 pm

Python does actually care about indentation, and it cares how you do it (somewhat), which should make sense given that it's done for readability and mixing tabs and spaces really hurts that.

My editor, Sublime, will unify tabs and spaces, and the error you get tells you what line you need to fix. However if you still need help with doing so you can post your script and we can take a look at it.
Due to the reasons discussed here we will be moving to on October 1, 2016.

This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
Posts: 3000
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Return to General Coding Help

Who is online

Users browsing this forum: No registered users and 16 guests