Hi Anna, You appear to be running a firedrake you have installed globally. (It's in /usr/local). Are you sure the virtualenv was active when you typed this? I suspect you have a very old firedrake with a broken PETSc installed globally which you usually don't hit. Regards, David On Wed, 27 Jan 2016 at 14:14 Anna Kalogirou <A.Kalogirou@leeds.ac.uk> wrote:
Dear all,
I was getting the error below, but it went away after a Firedrake update. However, now my code is running and the burgers tutorial is not, returning the same error I was getting earlier.
Anna.
Traceback (most recent call last): File "burgers.py", line 36, in <module> from firedrake import * File "/usr/local/lib/python2.7/site-packages/firedrake/__init__.py", line 30, in <module> from assemble import * File "/usr/local/lib/python2.7/site-packages/firedrake/assemble.py", line 8, in <module> import assembly_cache File "/usr/local/lib/python2.7/site-packages/firedrake/assembly_cache.py", line 40, in <module> import function File "/usr/local/lib/python2.7/site-packages/firedrake/function.py", line 9, in <module> import assemble_expressions File "/usr/local/lib/python2.7/site-packages/firedrake/assemble_expressions.py", line 15, in <module> import functionspace File "/usr/local/lib/python2.7/site-packages/firedrake/functionspace.py", line 10, in <module> import dmplex ImportError: dlopen(/usr/local/lib/python2.7/site-packages/firedrake/dmplex.so, 2): Library not loaded: /usr/local/lib/python2.7/site-packages/petsc/lib/libpetsc.3.05.2.dylib Referenced from: /usr/local/lib/python2.7/site-packages/firedrake/dmplex.so Reason: image not found
Hi David, The weird thing that is happening now is that sometimes I get this error and sometimes not. You are right: this happens when I open a new shell tab and in this case the virtualenv is not active. It tells me “ -bash: firedrake/bin/activate: No such file or directory “. How can I fix this? Thanks, Anna. On 28 Jan 2016, at 10:51, David Ham <david.ham@imperial.ac.uk<mailto:david.ham@imperial.ac.uk>> wrote: Hi Anna, You appear to be running a firedrake you have installed globally. (It's in /usr/local). Are you sure the virtualenv was active when you typed this? I suspect you have a very old firedrake with a broken PETSc installed globally which you usually don't hit. Regards, David On Wed, 27 Jan 2016 at 14:14 Anna Kalogirou <A.Kalogirou@leeds.ac.uk<mailto:A.Kalogirou@leeds.ac.uk>> wrote: Dear all, I was getting the error below, but it went away after a Firedrake update. However, now my code is running and the burgers tutorial is not, returning the same error I was getting earlier. Anna. Traceback (most recent call last): File "burgers.py", line 36, in <module> from firedrake import * File "/usr/local/lib/python2.7/site-packages/firedrake/__init__.py", line 30, in <module> from assemble import * File "/usr/local/lib/python2.7/site-packages/firedrake/assemble.py", line 8, in <module> import assembly_cache File "/usr/local/lib/python2.7/site-packages/firedrake/assembly_cache.py", line 40, in <module> import function File "/usr/local/lib/python2.7/site-packages/firedrake/function.py", line 9, in <module> import assemble_expressions File "/usr/local/lib/python2.7/site-packages/firedrake/assemble_expressions.py", line 15, in <module> import functionspace File "/usr/local/lib/python2.7/site-packages/firedrake/functionspace.py", line 10, in <module> import dmplex ImportError: dlopen(/usr/local/lib/python2.7/site-packages/firedrake/dmplex.so, 2): Library not loaded: /usr/local/lib/python2.7/site-packages/petsc/lib/libpetsc.3.05.2.dylib Referenced from: /usr/local/lib/python2.7/site-packages/firedrake/dmplex.so Reason: image not found _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk<mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
On 28 Jan 2016, at 10:58, Anna Kalogirou <A.Kalogirou@leeds.ac.uk> wrote:
Hi David,
The weird thing that is happening now is that sometimes I get this error and sometimes not.
You are right: this happens when I open a new shell tab and in this case the virtualenv is not active. It tells me “ -bash: firedrake/bin/activate: No such file or directory “.
This sounds like you are activating the virtualenv in your ~/.bashrc. But you haven't provided a full path to it. So sometimes you launch a new terminal in a directory such that the relative path firedrake/bin/activate exists, and sometimes it doesn't. Is this right? Lawrence
Yes I write the following in my .bash_profile: source firedrake/bin/activate Should it be in the .bashrc? On 28 Jan 2016, at 11:18, Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk<mailto:lawrence.mitchell@imperial.ac.uk>> wrote: On 28 Jan 2016, at 10:58, Anna Kalogirou <A.Kalogirou@leeds.ac.uk<mailto:A.Kalogirou@leeds.ac.uk>> wrote: Hi David, The weird thing that is happening now is that sometimes I get this error and sometimes not. You are right: this happens when I open a new shell tab and in this case the virtualenv is not active. It tells me “ -bash: firedrake/bin/activate: No such file or directory “. This sounds like you are activating the virtualenv in your ~/.bashrc. But you haven't provided a full path to it. So sometimes you launch a new terminal in a directory such that the relative path firedrake/bin/activate exists, and sometimes it doesn't. Is this right? Lawrence _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk<mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
On 28 Jan 2016, at 11:21, Anna Kalogirou <A.Kalogirou@leeds.ac.uk> wrote:
Yes I write the following in my .bash_profile: source firedrake/bin/activate
Should it be in the .bashrc?
No, it's fine to be in ~/.bash_profile, however, you need to provide an absolute path, rather than a relative one (so that it doesn't matter where you launch the new terminal window). Assuming the firedrake directory is in $HOME, you can do: source $HOME/firedrake/bin/activate Cheers, Lawrence
participants (3)
- 
                
                Anna Kalogirou
- 
                
                David Ham
- 
                
                Lawrence Mitchell