>sudo apt-get-repository ppa:fenics-packages/fenics>sudo apt update>sudo apt install fenics>sudo apt upgrade
Good afternoon,OS: Ubuntu 18.04.1 LTSPython version : 2.7My fenics was running fine and up to date yesterday, I updated the system by :>sudo apt-get-repository ppa:fenics-packages/fenics>sudo apt update>sudo apt install fenics>sudo apt upgrade
Now, when I run a script (e.g. ft01_poisson.py from the tutorial) wither as an executable or through python I recieve the error:./ft01_poisson.py>Traceback (most recent call last):> File "./ft01_poisson.py", line 14, in <module>
> from fenics import *
>ImportError: No module named fenics
python2 ft01_posson.py
>Traceback (most recent call last):
> File "ft01_poisson.py", line 14, in <module>
> from fenics import *
>ImportError: No module named fenics
It appears that the python package of fenics is no longer there.ls /usr/local/lib/python2.7/dist-packages/fenics
> ls: cannot access '/usr/local/lib/python2.7/dist-packages/fenics': No such file or directory
python -c 'import fenics'
>Traceback (most recent call last):
> File "<string>", line 1, in <module>
>ImportError: No module named fenics
sudo apt list --installed | grep fenics>
>WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
>
>fenics/bionic,bionic,now 1:2018.1.0.2~ppa1~bionic1 all [installed]
>pybind11-dev/bionic,bionic,now 2.2.3-1fenics1bionic1 all [installed,automatic]
>python3-pybind11/bionic,bionic,now 2.2.3-1fenics1bionic1 all [installed,automatic]
It seems that fenics is installed but python can't find it, do I have to change the directory which I've installed it in to or change my python config to send a fenics import to another directory? Obviously I'm not really keen to adjust the config files as there's so many dependencies.CheersFraser
--
You received this message because you are subscribed to the Google Groups "fenics-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fenics-suppor...@googlegroups.com.
To post to this group, send email to fenics-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fenics-support/0b6c9688-0ccd-4550-9ec1-c4df7586ab0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Just going to reply quickly, and say the last time I used fenics it was supporting python 2.
I've tried running it through python 3 and it's working, however obviously there are some legacy issues in the python2 formatting in my examples (e.g. print "t="%t instead of print("t="%t)).
sudo apt-get install --no-install-recommends software-properties-common
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install --no-install-recommends fenics
I ran a couple of examples (please find them attached) that were mentioned in the documentation but I got some errors. I am using Python 3.
When I ran Example1: ft01_poisson.py, got the following error message:
Solving linear variational problem.
*** Warning: Degree of exact solution may be inadequate for accurate result in errornorm.
error_L2 = 0.008235098073354943
error_max = 1.3322676295501878e-15
Traceback (most recent call last):
File "ft01_poisson.py", line 60, in <module>
interactive()
NameError: name 'interactive' is not defined
When I ran Example 7: ft07_navier_stokes_channel.py, got the following error message:
Traceback (most recent call last):
File "ft07_navier_stokes_channel.py", line 118, in <module>
error = np.abs(u_e.vector().array() - u_.vector().array()).max()
AttributeError: 'dolfin.cpp.la.PETScVector' object has no attribute 'array'
Could you please suggest how to resolve these issues?
Thanks and regards,
-Bharat
--
You received this message because you are subscribed to the Google Groups "fenics-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fenics-suppor...@googlegroups.com.
To post to this group, send email to fenics-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fenics-support/328a1fd5-d4c2-4863-9f54-34ff6102b84a%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fenics-support/48272198-b7c7-483b-9e5d-91955c5eed6d%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fenics-support/CALjQY_FkAwCf7ubPOg2h4iNP4K3efatx28RdusBcik7Yf7pttw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fenics-support/3BEDD167-8B6C-4330-A55C-4C1094F27FCF%40gmail.com.