Isn't RHEL4 too old as well, now? On Tue, Apr 16, 2013 at 3:48 AM, Milind Vaidya <[email protected]> wrote: > Thanks...I will upgrade n check...I was using whatever installed on my RHEL4 > box.... > > > On Mon, Apr 15, 2013 at 4:50 PM, Miki Tebeka <[email protected]> wrote: >> >> Python 2.3 is too old. IIRC the minimal Python version supported is 2.6. >> >> >> On Mon, Apr 15, 2013 at 1:54 PM, Milind Vaidya <[email protected]> wrote: >>> >>> I installed avro for python. >>> >>> Like Referred : >>> https://avro.apache.org/docs/current/gettingstartedpython.html >>> >>> >>> 1. Build as per the instructions. Here is the output. >>> >>> ************** Installation Output******************* >>> /usr/lib64/python2.3/distutils/dist.py:227: UserWarning: Unknown >>> distribution option: 'extras_require' >>> warnings.warn(msg) >>> /usr/lib64/python2.3/distutils/dist.py:227: UserWarning: Unknown >>> distribution option: 'install_requires' >>> warnings.warn(msg) >>> running install >>> running build >>> running build_py >>> running build_scripts >>> running install_lib >>> byte-compiling /usr/lib/python2.3/site-packages/avro/io.py to io.pyc >>> File "/usr/lib/python2.3/site-packages/avro/io.py", line 371 >>> @staticmethod >>> ^ >>> SyntaxError: invalid syntax >>> byte-compiling /usr/lib/python2.3/site-packages/avro/schema.py to >>> schema.pyc >>> File "/usr/lib/python2.3/site-packages/avro/schema.py", line 589 >>> @staticmethod >>> ^ >>> SyntaxError: invalid syntax >>> byte-compiling /usr/lib/python2.3/site-packages/avro/datafile.py to >>> datafile.pyc >>> File "/usr/lib/python2.3/site-packages/avro/datafile.py", line 71 >>> @staticmethod >>> ^ >>> SyntaxError: invalid syntax >>> running install_scripts >>> changing mode of /usr/bin/avro to 755 >>> ************** Installation Output******************* >>> >>> 2.I checked import avro on python prompt as follows >>> Python 2.3.4 (#1, Jan 11 2011, 14:40:50) >>> [GCC 3.4.6 20060404 (Red Hat 3.4.6-11)] on linux2 >>> Type "help", "copyright", "credits" or "license" for more information. >>> >>> import avro >>> >>> >>> >>> 3. I created the file user.avsc containing schema given at about link >>> >>> 4. Copied the code from above link in BasicAvro.py (I added #! >>> /usr/bin/python) >>> >>> 5.Both BasicAvrio..py and user.avsc are in the same directory. If I run >>> >>> pyhon BasicAvro.py >>> >>> gives error >>> >>> Traceback (most recent call last): >>> File "BasicAvro.py", line 2, in ? >>> import avro.schema >>> File "/usr/lib/python2.3/site-packages/avro/schema.py", line 589 >>> @staticmethod >>> ^ >>> SyntaxError: invalid syntax >>> >>> 6. Tried executing the script under scripts directory called avro. >>> >>> gives following error >>> >>> File "avro", line 75 >>> return dict((k, obj[k]) for k in (set(obj) & fields)) >>> ^ >>> SyntaxError: invalid syntax >>> >>> 7. What is going wrong ? >>> >>> >>> >>> >>> >>> >>> >> >
-- Harsh J
