except IOError as e during manual install with python

Asked by imranal

I am trying to install instant in an environment where I do not have sudo access.

Running the following command leads to the error message/ incomplete installation :

------------------------------------------------------

$ python setup.py install --prefix=~/imranal
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/instant
copying instant/__init__.py -> build/lib/instant
copying instant/build.py -> build/lib/instant
copying instant/cache.py -> build/lib/instant
copying instant/codegeneration.py -> build/lib/instant
copying instant/config.py -> build/lib/instant
copying instant/inlining.py -> build/lib/instant
copying instant/locking.py -> build/lib/instant
copying instant/output.py -> build/lib/instant
copying instant/paths.py -> build/lib/instant
copying instant/signatures.py -> build/lib/instant
creating build/lib/instant/swig
copying instant/swig/numpy.i -> build/lib/instant/swig
running build_scripts
creating build/scripts-2.5
copying and adjusting scripts/instant-clean -> build/scripts-2.5
copying and adjusting scripts/instant-showcache -> build/scripts-2.5
changing mode of build/scripts-2.5/instant-clean from 600 to 755
changing mode of build/scripts-2.5/instant-showcache from 600 to 755
running install_lib
byte-compiling /uio/arkimedes/s07/imranal/imranal/lib/python2.5/site-packages/instant/__init__.py to __init__.pyc
  File "/uio/arkimedes/s07/imranal/imranal/lib/python2.5/site-packages/instant/__init__.py", line 24
    from .output import *
SyntaxError: 'import *' not allowed with 'from .'

byte-compiling /uio/arkimedes/s07/imranal/imranal/lib/python2.5/site-packages/instant/build.py to build.pyc
  File "/uio/arkimedes/s07/imranal/imranal/lib/python2.5/site-packages/instant/build.py", line 157
    except OSError as e:
                    ^
SyntaxError: invalid syntax

byte-compiling /uio/arkimedes/s07/imranal/imranal/lib/python2.5/site-packages/instant/cache.py to cache.pyc
  File "/uio/arkimedes/s07/imranal/imranal/lib/python2.5/site-packages/instant/cache.py", line 38
    except Exception as e:
                      ^
SyntaxError: invalid syntax

byte-compiling /uio/arkimedes/s07/imranal/imranal/lib/python2.5/site-packages/instant/output.py to output.pyc
  File "/uio/arkimedes/s07/imranal/imranal/lib/python2.5/site-packages/instant/output.py", line 65
    except IOError as e:
                    ^
SyntaxError: invalid syntax

byte-compiling /uio/arkimedes/s07/imranal/imranal/lib/python2.5/site-packages/instant/paths.py to paths.pyc
  File "/uio/arkimedes/s07/imranal/imranal/lib/python2.5/site-packages/instant/paths.py", line 74
    except os.error as e:
                     ^
SyntaxError: invalid syntax

byte-compiling /uio/arkimedes/s07/imranal/imranal/lib/python2.5/site-packages/instant/signatures.py to signatures.pyc
  File "/uio/arkimedes/s07/imranal/imranal/lib/python2.5/site-packages/instant/signatures.py", line 22
    except IOError as e:
                    ^
SyntaxError: invalid syntax

running install_scripts
copying build/scripts-2.5/instant-clean -> /uio/arkimedes/s07/imranal/imranal/bin
copying build/scripts-2.5/instant-showcache -> /uio/arkimedes/s07/imranal/imranal/bin
changing mode of /uio/arkimedes/s07/imranal/imranal/bin/instant-clean to 755
changing mode of /uio/arkimedes/s07/imranal/imranal/bin/instant-showcache to 755
running install_data
running install_egg_info
Removing /uio/arkimedes/s07/imranal/imranal/lib/python2.5/site-packages/instant-1.1.0-py2.5.egg-info
Writing /uio/arkimedes/s07/imranal/imranal/lib/python2.5/site-packages/instant-1.1.0-py2.5.egg-info

-------------------------------------

My intention is to install FEniCS. I am trying to follow the following guide :

http://fenicsproject.org/download/installation_from_source.html#installation-from-source

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu instant Edit question
Assignee:
No assignee Edit question
Solved by:
imranal
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Which version of Ubuntu and python are you running?

Please open a terminal and issue the commands

lsb_relase -a
uname -a
which python
python --version

and then copy/paste all outpu into a new message of this question document

Revision history for this message
imranal (imranal) said :
#2

Pasting all required info :

imranal@rubin ~ $ lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: RedHatEnterpriseClient
Description: Red Hat Enterprise Linux Client release 5.9 (Tikanga)
Release: 5.9
Codename: Tikanga

imranal@rubin ~ $ uname -a
Linux rubin.ifi.uio.no 2.6.18-348.3.1.el5 #1 SMP Tue Mar 5 13:19:32 EST 2013 x86_64 GNU/Linux

imranal@rubin ~ $ which python
python is /local/bin/python

imranal@rubin ~ $ python --version
Python 2.5.2

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

This is a support platform for Ubuntu. You are running Red Hat, which differs much. Sorry, but we cannot help. You might try http://www.linuxquestions.org/questions/red-hat-31/

Revision history for this message
imranal (imranal) said :
#4

I managed to solve this problem by using python 2.7. Apparently there was bug in the python version I was using.