installing fenics on Windows using anaconda

5,437 views
Skip to first unread message

kd.9...@gmail.com

unread,
Apr 21, 2018, 2:35:14 PM4/21/18
to fenics-support
Hello,

I'm trying to install Fenics on Windows using Anaconda Python.  I'm completely new to Python and Fenics, and I am trying to get going on Python so I can stop using Matlab so ideally I want an interface that looks like Matlab.

I installed Anaconda and it seems to work fine (I tried simple plotting and calculations in Spyder and everything works as expected).  I now tried to install Fenics using the instructions here:
(scroll down to Fenics on Anaconda)

I tried the instructions there in a new Jupyter notebook as well as directly in the iPython console.  Both give me the error below.  This is the first thing that I did once I set up Anaconda, so I haven't changed any defaults or stuff like that.

Thanks for any help,

K. Dayal




!conda config --add channels conda-forge
!conda install fenics

kd.9...@gmail.com

unread,
Apr 21, 2018, 2:39:08 PM4/21/18
to fenics-support
I see that my pasting of the Jupyter notebook has screwed up the formatting and it is probably unreadable, so here it is again in plaintext:


In [3]: !conda config --add channels conda-forge
Warning: 'conda-forge' already in 'channels' list, moving to the top

In [4]: !conda install fenics

Jack Hale

unread,
Apr 21, 2018, 3:42:11 PM4/21/18
to kd.9...@gmail.com, fenics-support
FEniCS is only available for Mac and Linux versions of Anaconda.

You could try Docker?

--
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/9d837ce3-01d5-4948-b3a2-32136cd6ff43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

K Dayal

unread,
Apr 21, 2018, 3:52:35 PM4/21/18
to Jack Hale, fenics-support
Thanks. I did look up Docker but was confused about some basic issues
(as I wrote, I'm new to both Python and Fenics, and working in a
Windows environment).

I can find documentation on how to install Docker and how to install /
run Fenics in Docker. But I am confused / ignorant of how I go from
that point to then loading Fenics in my Windows Anaconda Python
installation. From everything that I could find online, it appears
that I have to run Python from within the Docker container, and it has
to be command line style rather than the Spyder interface.

Jack Hale

unread,
Apr 21, 2018, 4:42:48 PM4/21/18
to K Dayal, fenics-support
Indeed, it will be command line only.

K Dayal

unread,
Apr 21, 2018, 5:35:07 PM4/21/18
to Jack Hale, fenics-support
Thanks! Unfortunately that's what I suspected. 

So I guess there is no way to have the Spyder interface with fenics in windows?

Arkadz Kirshtein

unread,
Apr 21, 2018, 6:33:29 PM4/21/18
to K Dayal, fenics-support
If you really want to get the interface, what you can do is install Ubuntu on Windows, install anaconda environment  (first install gcc, cmake and anaconda itself) with Fenics, add spyder (or any other linux dev env) to that environment, and use xming to get the ui to work.
You will still have to deal with ubuntu command line to start the stuff, but after that you can work on UI.
Personally, I went with ubuntu command line and no UI.

>> email to fenics-support+unsubscribe@googlegroups.com.
>> To post to this group, send email to fenics-support@googlegroups.com.

--
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-support+unsubscribe@googlegroups.com.
To post to this group, send email to fenics-support@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fenics-support/CAHq7Fy-uqs1vVPpkwSW_7xfnyhcNaM1JJ1vuYS2QM90kpUvM%3DA%40mail.gmail.com.

K Dayal

unread,
Apr 21, 2018, 9:13:17 PM4/21/18
to Arkadz Kirshtein, fenics-support
Thanks for the tip! I'm going to try that. I've gotten very used to the Matlab interface where I can edit, run programs and random commands all in one place. So at least initially I want an interface that is close to that. 

>> email to fenics-suppor...@googlegroups.com.
>> To post to this group, send email to fenics-...@googlegroups.com.

--
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.

K Dayal

unread,
Apr 23, 2018, 12:24:06 AM4/23/18
to Arkadz Kirshtein, fenics-support
Hello Arkadz,

I just wanted to write that I tried your approach and it worked well
for me. Thanks very much.

I did it in a slightly simpler way than you suggested, but that was
due to my prior confusion in not knowing that the Spyder IDE has no
connection to Anaconda. Just to document the details for anyone else
searching for this:

1. I installed Ubuntu on Windows following the instruction at the link
in your previous email in this thread

2. I installed Spyder and other required packages for Python following
the instructions here:
http://milq.github.io/install-python-scientific-computing-ubuntu-debian/

3. I used xming to get the GUI going following the instructions here:
https://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/

4. Install Fenics on Ubuntu using the instructions here:
https://fenicsproject.org/download/

Now there is the issue that my files are located in a random directory
rather than in Dropbox where I would have liked, but that's an issue
for a different forum...
>>>> >> 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/9d837ce3-01d5-4948-b3a2-32136cd6ff43%40googlegroups.com.
>>>> >> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> 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.

K Dayal

unread,
Apr 23, 2018, 12:32:28 AM4/23/18
to Arkadz Kirshtein, fenics-support
> Now there is the issue that my files are located in a random directory
> rather than in Dropbox where I would have liked, but that's an issue
> for a different forum...

An update on this. Saving in /mnt/c/Users/... let's you save anywhere
you need, including Dropbox...
Reply all
Reply to author
Forward
0 new messages