I upgraded ipython and when I try importing firedrake it doesn't give an error, presumably that worked? but when I try it in python I get the following error. It now seems to be complaining that it has problems with petsc4py, which is something I installed in my other version of python. Should I try removing petsc4py from all my versions of python and then reinstall?
from firedrake import * Traceback (most recent call last): File "<stdin>", line 1, in <module> File "firedrake/__init__.py", line 3, in <module> import firedrake.petsc as petsc File "firedrake/petsc.py", line 5, in <module> petsc4py.init(sys.argv) File "/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/__init__.py", line 42, in init PETSc = petsc4py.lib.ImportPETSc(arch) File "/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/__init__.py", line 29, in ImportPETSc return Import('petsc4py', 'PETSc', path, arch) File "/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/__init__.py", line 64, in Import module = imp.load_module(fullname, fo, fn, stuff) ImportError: dlopen(/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/darwin10.6.0-c-debug/PETSc.so, 2): Library not loaded: /sw/lib/openmpi/libmpi.1.dylib Referenced from: /Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/darwin10.6.0-c-debug/PETSc.so Reason: image not found
------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:39 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake py.test is only for running tests (which were written for py.test). Otherwise you can just use python to run firedrake scripts. For interactive sessions, ipython provides a better experience (you can pip install ipython). Once you are in python (or ipython), just: from firedrake import * and go ahead using Firedrake. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:33 To: firedrake Subject: Re: [firedrake] upgrading firedrake I agree that is good news for the tests. Unfortunately, I can't use py.test to open up a python session. Any ideas what I should do? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:32 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake You should use py.test to run the tests. 'make alltest' uses py.test as well. The output shows that all the tests in tests/test_0init.py has passed, which is definitely a success. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:28 To: firedrake Subject: Re: [firedrake] upgrading firedrake Ah, thanks. I properly installed pytest. I ran the following with some success py.test tests/test_0init.py Does this mean I should replace my python with py.test or something else? =============================================================================================== test session starts ================================================================================================ platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collected 2 items tests/test_0init.py .. ============================================================================================= 2 passed in 0.71 seconds ============================================================================================= ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:24 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake Seems like you already have a pytest outside your virtualenv which gets picked up. You can force the installation of pytest inside the virtualenv by pip install --ignore-installed pytest Using pip install --upgrade pytest might also work. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:20 To: firedrake Subject: Re: [firedrake] upgrading firedrake Thanks for the reply. First I tried to install pytest and it seemed to already be there. I then tried py.test and it added a couple of new tests at the beginning. It's still running but they seem to be passing. In particular, tests/test_0init.py passes, but when I try python tests/test_0init.py it fails because it can't import firedrake. There seems to be a problem with how the libraries are set up, as suggested by previous emails. (firedrake)am-laptop24:firedrake fpoulin$ pip install pytest Requirement already satisfied (use --upgrade to upgrade): pytest in /usr/local/lib/python2.7/site-packages Requirement already satisfied (use --upgrade to upgrade): py>=1.4.29 in /usr/local/lib/python2.7/site-packages (from pytest) (firedrake)am-laptop24:firedrake fpoulin$ py.test ========================================================== test session starts ========================================================== platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collecting 2 items collected 3589 items / 4 errors pylit/doc/examples/testfile_literate.py.txt F pylit/doc/examples/testmod_literate.py.txt F tests/test_0init.py F. tests/test_ffc_interface.py .......... tests/benchmarks/test_assembly_overheads.py ssssssssssssssssssssssssss ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:00 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake
python tests/test_0init.py
Please try py.test instead of python. If you have no py.test (in your virtualenv), install it with: pip install pytest ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 17:58 To: firedrake Subject: Re: [firedrake] upgrading firedrake Hello, Since yesterday I have reinstalled firedrake on my mac and still get the same issues. What I don't understand is that when I do make alltest it seems to run most of the tests ok. But when I try running python tests/test_0init.py it fails. Any idea what make alltest does differently that would work? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake