Hello Dimitrov, Thanks a lot for your thorough report. I think you'll have to install gfortran with apt-get. I'm working with Anaconda developers to avoid this step. Please don't hesitate to fill an issue on GitHub if further problems appear.
Juan Luis On Sep 12, 2015 7:00 PM, "Kaloyan Dimitrov Marinov" <[email protected]> wrote: > Hello, > > *In summary:* > > I tried executing a Python script named > /home/a5du1kkt/Desktop/testing_out_fenics/test_fenics_program.py (its > source code is included at the end of this message) on my Ubuntu machine, > but I got an *ImportError: libgfortran.so.3: cannot open shared object > file: No such file or directory * > > *In more detail, here is exactly what software I have and commands I can:* > > I have a freshly installed Ubuntu 14.04 LTS and installed the Anaconda > Python distribution. > > Afterwards, I installed FEniCS from conda packages (as described on > http://fenicsproject.org/download/ ); the third command (from > http://fenicsproject.org/download/) is > > conda install fenics --channel juanlu001 > > and, after running that, I got the following output: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > *Fetching package metadata: ...... Solving package specifications: . > Package plan for installation in environment > /home/a5du1kkt/anaconda/envs/fenics27: The following NEW packages will be > INSTALLED: boost: 1.57.0-4 cmake: > 3.2.3-0 dolfin: 1.6.0-py27_2 eigen3: > 3.2.1-1 fastcache: 1.0.2-py27_0 fenics: > 1.6.0-0 ffc: 1.6.0-py27_2 fiat: > 1.6.0-np19py27_1 fontconfig: 2.11.1-4 freetype: > 2.5.2-2 icu: 54.1-0 instant: > 1.6.0-py27_2 libgfortran: 1.0-0 libpng: > 1.6.17-0 libxml2: 2.9.2-0 mkl: > 11.1-np19py27_p3 mkl-rt: 11.1-p0 mkl-service: > 1.0.0-py27_p1 mpi4py: 1.3.1-py27_0 mpich2: > 1.4.1p1-0 nose: 1.3.7-py27_0 numexpr: > 2.3.1-np19py27_0 numpy: 1.9.2-py27_1 openblas: > 0.2.14-1 pcre: 8.31-0 petsc: > 3.5.2-py27_2 petsc4py: 3.5.1-py27_1 ply: > 3.6-py27_0 qt: 4.8.6-3 scikit-learn: > 0.15.2-np19py27_0 scipy: 0.16.0-np19py27_1 six: > 1.9.0-py27_0 slepc: 3.5.4-py27_1 swig: > 3.0.7-0 sympy: 0.7.6.1-py27_0 ufl: > 1.6.0-py27_1 vtk: 5.10.1-py27_1 Proceed ([y]/n)?* > > I typed in 'y' and hit ENTER, and I got the following output: > > > *Linking packages ... [ COMPLETE > ]|#############################################################################################################################################| > 100%* > > Then, I navigated into /home/a5du1kkt/Desktop/testing_out_fenics/ and ran > > *python test_fenics_program.py* > > which produced the following output: > > > > > > > > > > > > > > *Traceback (most recent call last): File "test_fenics_program.py", line > 8, in <module> from dolfin import * File > "/home/a5du1kkt/anaconda/envs/fenics27/lib/python2.7/site-packages/dolfin/__init__.py", > line 16, in <module> from . import cpp File > "/home/a5du1kkt/anaconda/envs/fenics27/lib/python2.7/site-packages/dolfin/cpp/__init__.py", > line 42, in <module> exec("from . import %s" % module_name) File > "<string>", line 1, in <module> File > "/home/a5du1kkt/anaconda/envs/fenics27/lib/python2.7/site-packages/dolfin/cpp/common.py", > line 32, in <module> _common = swig_import_helper() File > "/home/a5du1kkt/anaconda/envs/fenics27/lib/python2.7/site-packages/dolfin/cpp/common.py", > line 28, in swig_import_helper _mod = imp.load_module('_common', fp, > pathname, description) ImportError: libgfortran.so.3: cannot open shared > object file: No such file or directory* > > Could you kindly advise me how I should resolve this issue? Thank you in > advance. > > > > > > > > *# BEGIN: source code of > /home/a5du1kkt/Desktop/testing_out_fenics/test_fenics_program.py* > > """ > FEniCS tutorial demo program: Poisson equation with Dirichlet conditions. > Simplest example of computation and visualization with FEniCS. > -Laplace(u) = f on the unit square. > u = u0 on the boundary. > u0 = u = 1 + x^2 + 2y^2, f = -6. > """ > from dolfin import * > # Create mesh and define function space > mesh = UnitSquareMesh(6, 4) > #mesh = UnitCube(6, 4, 5) > V = FunctionSpace(mesh, 'Lagrange', 1) > # Define boundary conditions > u0 = Expression('1 + x[0]*x[0] + 2*x[1]*x[1]') > def u0_boundary(x, on_boundary): > return on_boundary > bc = DirichletBC(V, u0, u0_boundary) > # Define variational problem > u = TrialFunction(V) > v = TestFunction(V) > f = Constant(-6.0) > a = inner(nabla_grad(u), nabla_grad(v))*dx > L = f*v*dx > # Compute solution > u = Function(V) > solve(a == L, u, bc) > # Plot solution and mesh > plot(u) > plot(mesh) > # Dump solution to file in VTK format > file = File('poisson.pvd') > file << u > # Hold plot > #interactive() > > *# END: source code of > /home/a5du1kkt/Desktop/testing_out_fenics/test_fenics_program.py* > > _______________________________________________ > fenics-support mailing list > [email protected] > http://fenicsproject.org/mailman/listinfo/fenics-support > >
_______________________________________________ fenics-support mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics-support
