Hi I have recently installed Firedrake to my Ubuntu 16 and made all tests successfully. However it doest show up in any of Python3 directories. Therefore, the command " from firedrake import * " never works. If you have any suggestion, I would really appreciate. Have a good day.
Hi Erdi, The install script installs firedrake in a venv (https://docs.python.org/3/library/venv.html) called firedrake in the directory you ran it in. You need to activate this venv (see http://firedrakeproject.org/download.html) in the shell before you can use firedrake: this is done deliberately so that we don't conflict with any system python packages. Thanks, Lawrence
On 3 Oct 2017, at 01:51, Kara, Erdi <erdi.kara@ttu.edu> wrote:
Hi
I have recently installed Firedrake to my Ubuntu 16 and made all tests successfully. However it doest show up in any of Python3 directories. Therefore, the command “ from firedrake import * “ never works. If you have any suggestion, I would really appreciate. Have a good day. _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
I think i already did that but no progress at all. I activated firedrake then I copied the first example -Helmholtz- and saved as python file and try to run it via terminal. I attached the screen shot. Could you tell me where I am making mistake.? I am a new user. ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> Sent: Tuesday, October 3, 2017 2:44:09 AM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] where is firedrake... Hi Erdi, The install script installs firedrake in a venv (https://docs.python.org/3/library/venv.html) called firedrake in the directory you ran it in. You need to activate this venv (see http://firedrakeproject.org/download.html) in the shell before you can use firedrake: this is done deliberately so that we don't conflict with any system python packages. Thanks, Lawrence On 3 Oct 2017, at 01:51, Kara, Erdi <erdi.kara@ttu.edu<mailto:erdi.kara@ttu.edu>> wrote: Hi I have recently installed Firedrake to my Ubuntu 16 and made all tests successfully. However it doest show up in any of Python3 directories. Therefore, the command “ from firedrake import * “ never works. If you have any suggestion, I would really appreciate. Have a good day. _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk<mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
On 04/10/17 03:24, Kara, Erdi wrote:
I think i already did that but no progress at all. I activated firedrake then I copied the first example -Helmholtz- and saved as python file and try to run it via terminal. I attached the screen shot. Could you tell me where I am making mistake.? I am a new user.
It doesn't look like you're making a mistake! A few things: 1. Can you provide the file firedrake-install.log (which should live in the directory you ran firedrake-install from, it looks like ~/ from your screenshot). 2. After activating the venv (as you did), what is the output of these commands (don't type the dollar sign)? $ which python $ python -c "import sys; print(sys.path)" Thanks, Lawrence
I attached the install-log and the output of the command you wrote. thank you for your time. ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> Sent: Wednesday, October 4, 2017 3:58:17 AM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] where is firedrake... On 04/10/17 03:24, Kara, Erdi wrote:
I think i already did that but no progress at all. I activated firedrake then I copied the first example -Helmholtz- and saved as python file and try to run it via terminal. I attached the screen shot. Could you tell me where I am making mistake.? I am a new user.
It doesn't look like you're making a mistake! A few things: 1. Can you provide the file firedrake-install.log (which should live in the directory you ran firedrake-install from, it looks like ~/ from your screenshot). 2. After activating the venv (as you did), what is the output of these commands (don't type the dollar sign)? $ which python $ python -c "import sys; print(sys.path)" Thanks, Lawrence _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
sorry about the mess. ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of David Ham <david.ham@imperial.ac.uk> Sent: Wednesday, October 4, 2017 12:16:04 PM To: firedrake imperial.ac.uk Cc: firedrake imperial.ac.uk Subject: Re: [firedrake] where is firedrake... You mistyped python in "which python", can you try that again please? David Ham Department of Mathematics Imperial College London On Oct 4 2017, at 6:08 pm, Kara, Erdi <erdi.kara@ttu.edu> wrote: I attached the install-log and the output of the command you wrote. thank you for your time. ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> Sent: Wednesday, October 4, 2017 3:58:17 AM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] where is firedrake... On 04/10/17 03:24, Kara, Erdi wrote:
I think i already did that but no progress at all. I activated firedrake then I copied the first example -Helmholtz- and saved as python file and try to run it via terminal. I attached the screen shot. Could you tell me where I am making mistake.? I am a new user.
It doesn't look like you're making a mistake! A few things: 1. Can you provide the file firedrake-install.log (which should live in the directory you ran firedrake-install from, it looks like ~/ from your screenshot). 2. After activating the venv (as you did), what is the output of these commands (don't type the dollar sign)? $ which python $ python -c "import sys; print(sys.path)" Thanks, Lawrence _______________________________________________ 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
i think the outcome is same. thank you so much for your time. ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of David Ham <david.ham@imperial.ac.uk> Sent: Thursday, October 5, 2017 5:10:21 AM To: firedrake imperial.ac.uk Cc: firedrake imperial.ac.uk Subject: Re: [firedrake] where is firedrake... Hi Erdi, This is quite odd. There is clearly something subtly wrong here: sys.path should have lots of entries from /home/erdi/firedrake Can you try a couple more lines: python -c "import sys; print(sys.executable)" /home/erdi/firedrake/bin/python -c "import sys; print(sys.path)" Apologies too that the time difference slows down debugging. Regards, David -- David Ham Department of Mathematics Imperial College London On Oct 5 2017, at 2:33 am, Kara, Erdi <erdi.kara@ttu.edu> wrote: sorry about the mess. ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of David Ham <david.ham@imperial.ac.uk> Sent: Wednesday, October 4, 2017 12:16:04 PM To: firedrake imperial.ac.uk Cc: firedrake imperial.ac.uk Subject: Re: [firedrake] where is firedrake... You mistyped python in "which python", can you try that again please? David Ham Department of Mathematics Imperial College London On Oct 4 2017, at 6:08 pm, Kara, Erdi <erdi.kara@ttu.edu> wrote: I attached the install-log and the output of the command you wrote. thank you for your time. ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> Sent: Wednesday, October 4, 2017 3:58:17 AM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] where is firedrake... On 04/10/17 03:24, Kara, Erdi wrote:
I think i already did that but no progress at all. I activated firedrake then I copied the first example -Helmholtz- and saved as python file and try to run it via terminal. I attached the screen shot. Could you tell me where I am making mistake.? I am a new user.
It doesn't look like you're making a mistake! A few things: 1. Can you provide the file firedrake-install.log (which should live in the directory you ran firedrake-install from, it looks like ~/ from your screenshot). 2. After activating the venv (as you did), what is the output of these commands (don't type the dollar sign)? $ which python $ python -c "import sys; print(sys.path)" Thanks, Lawrence _______________________________________________ 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
What if I try to reinstall pyhthon, firedrake and all these stuff. Does it create any difference? ________________________________ From: Kara, Erdi Sent: Thursday, October 5, 2017 9:05:15 AM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] where is firedrake... i think the outcome is same. thank you so much for your time. ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of David Ham <david.ham@imperial.ac.uk> Sent: Thursday, October 5, 2017 5:10:21 AM To: firedrake imperial.ac.uk Cc: firedrake imperial.ac.uk Subject: Re: [firedrake] where is firedrake... Hi Erdi, This is quite odd. There is clearly something subtly wrong here: sys.path should have lots of entries from /home/erdi/firedrake Can you try a couple more lines: python -c "import sys; print(sys.executable)" /home/erdi/firedrake/bin/python -c "import sys; print(sys.path)" Apologies too that the time difference slows down debugging. Regards, David -- David Ham Department of Mathematics Imperial College London On Oct 5 2017, at 2:33 am, Kara, Erdi <erdi.kara@ttu.edu> wrote: sorry about the mess. ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of David Ham <david.ham@imperial.ac.uk> Sent: Wednesday, October 4, 2017 12:16:04 PM To: firedrake imperial.ac.uk Cc: firedrake imperial.ac.uk Subject: Re: [firedrake] where is firedrake... You mistyped python in "which python", can you try that again please? David Ham Department of Mathematics Imperial College London On Oct 4 2017, at 6:08 pm, Kara, Erdi <erdi.kara@ttu.edu> wrote: I attached the install-log and the output of the command you wrote. thank you for your time. ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> Sent: Wednesday, October 4, 2017 3:58:17 AM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] where is firedrake... On 04/10/17 03:24, Kara, Erdi wrote:
I think i already did that but no progress at all. I activated firedrake then I copied the first example -Helmholtz- and saved as python file and try to run it via terminal. I attached the screen shot. Could you tell me where I am making mistake.? I am a new user.
It doesn't look like you're making a mistake! A few things: 1. Can you provide the file firedrake-install.log (which should live in the directory you ran firedrake-install from, it looks like ~/ from your screenshot). 2. After activating the venv (as you did), what is the output of these commands (don't type the dollar sign)? $ which python $ python -c "import sys; print(sys.path)" Thanks, Lawrence _______________________________________________ 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
On 9 Oct 2017, at 13:50, Kara, Erdi <erdi.kara@ttu.edu> wrote:
What if I try to reinstall pyhthon, firedrake and all these stuff. Does it create any difference?
This looks not to be a firedrake-specific problem, but rather a problem with creating the python3 venv in the first place. So let us try and debug that first! I wonder if you have any shell aliases set up: What does: $ alias print? If it says something like: alias python='/usr/local/bin/python3' Please do: $ unalias python and then let us try the sequence of commands that firedrake-install goes through to create the venv. $ python3 -c "import sys; print(sys.path)" $ python3 -m venv temp-venv $ . temp-venv/bin/activate $ temp-venv/bin/python3 -c "import sys; print(sys.path)" On my ubuntu machine I see something like this: $ python3 -c "import sys; print(sys.path)" ['', '/usr/lib/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', '/usr/lib/python3.5/lib-dynload', '/usr/local/lib/python3.5/dist-packages', '/usr/lib/python3/dist-packages'] $ python3 -m venv temp-venv $ . temp-venv/bin/activate $ temp-venv/bin/python3 -c "import sys; print(sys.path)" ['', '/usr/lib/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', '/usr/lib/python3.5/lib-dynload', '/homes/lmitche1/temp-venv/lib/python3.5/site-packages'] Notice how the last entry in the path list changed from pointing at /usr/.../dist-packages, to /homes/lmitche1/temp-venv/.../site-packages. To understand why your installation is failing, we need to figure out why this is not happening for you. Cheers, Lawrence
I could not get anything like alias python='/usr/local/bin/python3' after alias command but the rest of command displayed something similar to you. ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> Sent: Monday, October 9, 2017 8:04:24 AM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] where is firedrake...
On 9 Oct 2017, at 13:50, Kara, Erdi <erdi.kara@ttu.edu> wrote:
What if I try to reinstall pyhthon, firedrake and all these stuff. Does it create any difference?
This looks not to be a firedrake-specific problem, but rather a problem with creating the python3 venv in the first place. So let us try and debug that first! I wonder if you have any shell aliases set up: What does: $ alias print? If it says something like: alias python='/usr/local/bin/python3' Please do: $ unalias python and then let us try the sequence of commands that firedrake-install goes through to create the venv. $ python3 -c "import sys; print(sys.path)" $ python3 -m venv temp-venv $ . temp-venv/bin/activate $ temp-venv/bin/python3 -c "import sys; print(sys.path)" On my ubuntu machine I see something like this: $ python3 -c "import sys; print(sys.path)" ['', '/usr/lib/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', '/usr/lib/python3.5/lib-dynload', '/usr/local/lib/python3.5/dist-packages', '/usr/lib/python3/dist-packages'] $ python3 -m venv temp-venv $ . temp-venv/bin/activate $ temp-venv/bin/python3 -c "import sys; print(sys.path)" ['', '/usr/lib/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', '/usr/lib/python3.5/lib-dynload', '/homes/lmitche1/temp-venv/lib/python3.5/site-packages'] Notice how the last entry in the path list changed from pointing at /usr/.../dist-packages, to /homes/lmitche1/temp-venv/.../site-packages. To understand why your installation is failing, we need to figure out why this is not happening for you. Cheers, Lawrence _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
On 9 Oct 2017, at 17:07, Kara, Erdi <erdi.kara@ttu.edu> wrote:
I could not get anything like alias python='/usr/local/bin/python3' after alias command but the rest of command displayed something similar to you.
OK, so this is good, because it looks like venv creation works. The next step is to figure out what went wrong. I think I have an idea. In the temp-venv that you made, you should have a file pyvenv.cfg. What does: $ cat temp-venv/pyvenv.cfg Say? Similarly, you should have such a file in the firedrake directory. What does: $ cat firedrake/pyvenv.cfg Say? I think this might be the problem (in your first screenshot you had): $ pwd ~/firedrake $ ls bin helmholtz.py include lib lib64 share src But seemingly no pyvenv.cfg Cheers, Lawrence
Well, i got the these outputs from the last attempts... I am not sure what it means. Thank you for your patience! ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> Sent: Monday, October 9, 2017 11:29:55 AM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] where is firedrake...
On 9 Oct 2017, at 17:07, Kara, Erdi <erdi.kara@ttu.edu> wrote:
I could not get anything like alias python='/usr/local/bin/python3' after alias command but the rest of command displayed something similar to you.
OK, so this is good, because it looks like venv creation works. The next step is to figure out what went wrong. I think I have an idea. In the temp-venv that you made, you should have a file pyvenv.cfg. What does: $ cat temp-venv/pyvenv.cfg Say? Similarly, you should have such a file in the firedrake directory. What does: $ cat firedrake/pyvenv.cfg Say? I think this might be the problem (in your first screenshot you had): $ pwd ~/firedrake $ ls bin helmholtz.py include lib lib64 share src But seemingly no pyvenv.cfg Cheers, Lawrence _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
On 10/10/17 06:43, Kara, Erdi wrote:
Well, i got the these outputs from the last attempts... I am not sure what it means. Thank you for your patience!
OK, this means it looks the reason your firedrake venv is not working is due to the lack of pyvenv.cfg Can you run: /usr/bin/python3 -m venv --upgrade ~/firedrake Which will, I think, recreate the pyvenv.cfg file. Then you can activate the firedrake venv. $ source firedrake/bin/activate And see what has changed $ ls firedrake $ python -c "import sys; print(sys.path)" $ python -c "from firedrake import *" Cheers, Lawrence
i got this.. ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> Sent: Tuesday, October 10, 2017 6:33:43 AM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] where is firedrake... On 10/10/17 06:43, Kara, Erdi wrote:
Well, i got the these outputs from the last attempts... I am not sure what it means. Thank you for your patience!
OK, this means it looks the reason your firedrake venv is not working is due to the lack of pyvenv.cfg Can you run: /usr/bin/python3 -m venv --upgrade ~/firedrake Which will, I think, recreate the pyvenv.cfg file. Then you can activate the firedrake venv. $ source firedrake/bin/activate And see what has changed $ ls firedrake $ python -c "import sys; print(sys.path)" $ python -c "from firedrake import *" Cheers, Lawrence _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
On 10/10/17 22:25, Kara, Erdi wrote:
i got this..
OK, this is very mysterious. But, it seems there is no deep reason why the install should not have worked. So please try running the installation again from scratch: hopefully that will fix the venv issue. You will need to remove the firedrake directory, and then run firedrake-install again, providing the same options as before. Hopefully this will work, but if not, please let us know and we will try some more debugging. Cheers, Lawrence
yeah! it worked! it seems everything seems fine. At least, firedrake granted me a picture which looks like a result of an algorithm. Thank you for your time and efforts! I will be back soon but this time with questions pertaining to FEM... ________________________________ From: Kara, Erdi Sent: Tuesday, October 10, 2017 4:25:26 PM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] where is firedrake... i got this.. ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> Sent: Tuesday, October 10, 2017 6:33:43 AM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] where is firedrake... On 10/10/17 06:43, Kara, Erdi wrote:
Well, i got the these outputs from the last attempts... I am not sure what it means. Thank you for your patience!
OK, this means it looks the reason your firedrake venv is not working is due to the lack of pyvenv.cfg Can you run: /usr/bin/python3 -m venv --upgrade ~/firedrake Which will, I think, recreate the pyvenv.cfg file. Then you can activate the firedrake venv. $ source firedrake/bin/activate And see what has changed $ ls firedrake $ python -c "import sys; print(sys.path)" $ python -c "from firedrake import *" Cheers, Lawrence _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
On 12/10/17 05:48, Kara, Erdi wrote:
yeah! it worked! it seems everything seems fine. At least, firedrake granted me a picture which looks like a result of an algorithm. Thank you for your time and efforts! I will be back soon but this time with questions pertaining to FEM...
Great! Thanks for the patience over long distance debugging. Cheers, Lawrence
participants (3)
- 
                
                David Ham
- 
                
                Kara, Erdi
- 
                
                Lawrence Mitchell