Page 1 of 1

ubuntu 12.04 64 bit abinit 7.6.2 install test problem

Posted: Mon Mar 17, 2014 3:24 am
by osmanb
Hello,
I am trying to install abinit 7.6.2 on my ubuntu 12.04 system. I think the build went ok. I followed the instruction in the forum for ubuntu installs (use dthe config file but changed lib64 to just lib). But when I tried to do make check, I get the following python errror:
osman@osman-AV019AA-ABA-p6228p:~/src/abinit/abinit-7.6.2/tests$ ./runtests.py fast
Traceback (most recent call last):
File "./runtests.py", line 28, in <module>
abenv = tests.abenv
AttributeError: 'module' object has no attribute 'abenv'

Do I need some special python module to be installed??
Thanks in advance

Re: ubuntu 12.04 64 bit abinit 7.6.2 install test problem

Posted: Tue Mar 18, 2014 12:36 am
by gmatteo
Hi,

could you edit the code in ~abinit/tests/runtests.py around line 396?

# Add the two lines below:
print(dir(tests))
print(tests.__path__)

# Before this old code
abenv = tests.abenv


Could you rerun the script, and post the output so that I can pinpoint the problem.

Do I need some special python module to be installed??


No, the python script is compatible with python > 2.4 (no py3k) and it only requires the python standard library.

Re: ubuntu 12.04 64 bit abinit 7.6.2 install test problem

Posted: Tue Mar 18, 2014 1:53 am
by osmanb
Thanks for replying. I put those lines before line 28 (which is where abenv=tests.abenv line is ) :
osman@osman-AV019AA-ABA-p6228p:~/src/abinit/abinit-7.6.2/tests$ ./runtests.py
['__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__']
['/usr/lib/pymodules/python2.7/tests']
Traceback (most recent call last):
File "./runtests.py", line 30, in <module>
abenv = tests.abenv
AttributeError: 'module' object has no attribute 'abenv'

Re: ubuntu 12.04 64 bit abinit 7.6.2 install test problem

Posted: Tue Mar 18, 2014 2:14 am
by gmatteo
['/usr/lib/pymodules/python2.7/tests']


Ok, it's a well known problem.
Your python library defines a package module named "tests" whose name enters in conflict with the tests package provided by abinit

temporary workaround: change the PYTHONPATH variable so that the "tests" directory in the abinit top level directory comes first, i.e. (bash shell)

export PYTHONPATH=~abinit:$PYTHONPATH

where ~abinit is the *absolute* path pointing the abinit top level directory

Re: ubuntu 12.04 64 bit abinit 7.6.2 install test problem  [SOLVED]

Posted: Tue Mar 18, 2014 2:34 am
by osmanb
Thanks that solved my problem.
:D