kutsurak / python-bitstring

Automatically exported from code.google.com/p/python-bitstring
0 stars 0 forks source link

"Invalid Syntax" error at the time of installation #71

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What's the problem?

Failed to install bitstring-1.2.0 from the zip file. I tried to run
python setup.py install
as root user. It terminated with "Invalid Syntax" error. Following is
the output of that session:

# python setup.py install
running install
running build
running build_py
running install_lib
copying build/lib/bitstring.py -> /usr/lib/python2.5/site-packages
byte-compiling /usr/lib/python2.5/site-packages/bitstring.py to 
bitstring.pyc
  File "/usr/lib/python2.5/site-packages/bitstring.py", line 230
    REVERSED = 
b"\x00\x80\x40\xc0\x20\xa0\x60\xe0\x10\x90\x50\xd0\x30\xb0\x70\xf0" \
                                                                                 ^
SyntaxError: invalid syntax

running install_egg_info
Writing /usr/lib/python2.5/site-packages/bitstring-1.2.0.egg-info

What is the expected output? What do you see instead?

The package must have been installed without error. But installation
failed, even though required files have been copied to site-packages
area.

Which version are you using (bitstring.__version__) and what platform
(Linux, Windows, etc.)

bitstring 1.2.0 on Ubutu (Intrepid) Linux.

Please provide any additional information below.

"easy_install bitstring" doesn't work either. Exists with same error.

Original issue reported on code.google.com by Prasad.R...@gmail.com on 22 Jan 2010 at 10:02

GoogleCodeExporter commented 9 years ago
Hi, the problem seems to me that you are installing for Python 2.5. The latest
versions of the module only support Python 2.6 or 3.x.

If you need Python 2.5 support then the older 1.0.2 version should work 
(although it
is a little slower and has a few less features). Otherwise you need to install 
or use
a later version of Python.

I am surprised that 'easy_install' didn't work though. That should have picked 
up the
1.0.2 version. It's possible that you have Python 2.6 installed but that your 
default
'python' is still 2.5. (?)

Original comment by python.bitstring@googlemail.com on 22 Jan 2010 at 10:49