Is it possible to create an executable file that uses Fenics in Ubuntu and then install it to Windows?
For example, turning the demo_poisson.py into Windows software?
Transforming python files to windows executables are not something many people do. There exists applications for this, (auto-our-exe, pyinstaller, etc.). However, these packages seem quite limited.
Why can’t you use docker on your windows to run the python programs, which is by far the simplest way of running FEniCS, independent of platform
Because I want to make Windows executable file which contains FEA functions based on Fenics. My target users are not friendly with Linux.
I tried to install Fenics by building it manually as described here using Windows Command Prompt, but I did not success as the second step, installing DOLFIN
FENICS_VERSION=$(python3 -c"import ffc; print(ffc.version)")
git clone --branch=$FENICS_VERSION https://bitbucket.org/fenics-project/dolfin
git clone --branch=$FENICS_VERSION https://bitbucket.org/fenics-project/mshr
mkdir dolfin/build && cd dolfin/build && cmake … && make install && cd …/…
mkdir mshr/build && cd mshr/build && cmake … && make install && cd …/…
cd dolfin/python && pip3 install . && cd …/…
cd mshr/python && pip3 install . && cd …/…
If I call jupyter notebook from Windows Comment Prompt, it will come back to the original problem how to install Fenics to Windows Python using Comment Prompt.
If I call jupyter notebook from Window Subsystem Linux or Virtual Box, I have to ask my users to install a lot of things which is boring and must be avoided.
docker run -ti -p 127.0.0.1:8000:8000 -v $(pwd):/home/fenics/shared -w /home/fenics/shared Quay
I got this error
C:\Program Files\Docker\Docker\resources\bin\docker.exe: invalid reference format.
See ‘C:\Program Files\Docker\Docker\resources\bin\docker.exe run --help’.
docker: Error response from daemon: create (pwd): "(pwd)" includes invalid characters for
a local volume name, only “[a-zA-Z0-9][a-zA-Z0-9_.-]” are allowed. If you intended to pass a
host directory, use absolute path.
I can see fenicsproject/stable is stored in docker’s images.
Read the error message. Your path contains invaild error messages. Googling parts of the error messages gives examples where you have to encapsulate your path with " ". Please spend some minutes googling the error messages before posting new questions.
Additionally, to run the fenicsproject command you need to call curl -s https://get.fenicsproject.org | bash first, as described at the FEniCS download site