Please note that all the SIEpedia's articles address specific issues or questions raised by IAC users, so they do not attempt to be rigorous or exhaustive, and may or may not be useful or applicable in different or more general contexts.
Using the latest MacPorts Python2 packages, the Molecfit GUI interface is broken, with missing and/or displaced elements. After trying to reinstall packages, or creating a specific virtual environment, we have been unable to solve the problem (which seems related to the version of the wxpython package).
We thus have decided to replicate the Molecfit installation under Ubuntu 18.04 (where it works fine) ina Docker container, and thus install and run such container on the Mac.
We must first install Docker on the Mac. Just follow the instructions on https://docs.docker.com/docker-for-mac/install/. Probably you need to register on the Docker website to be able to download and run the installer.
sudo docker pull ubuntu:bionic
unminimize command inside the container so as to install the tools for human interaction. docker run -it --name ubuntu1804 ubuntu:bionic unminimize (this inside the container)
apt install python-matplotlib python-wxtools python-wxversion python-astropy apt install gcc make xterm
/opt/molecfit) cd /home/ wget -cNS ftp://ftp.eso.org/pub/dfs/pipelines/skytools/molecfit/molecfit_installer_gnu_linux_x86_64.run bash molecfit_installer_gnu_linux_x86_64.run exit
docker commit ubuntu1804
docker images
docker tag <hash> ubuntu1804_molecfit docker container ls -a # list available containers docker export <hash> > ~/molecfit_docker_container.tar It should also possible to export the image, but when I tried it I received the error message: " Error response from daemon: file integrity checksum failed for "usr/share/locale/hu/LC_MESSAGES/iso_3166-1.mo" (even increasing the maximum value for the RAM allocated to Docker, and trying other tricks, I was unable to fix the error).
cat molecfit_docker_container.tar | sudo docker import - molecfit_docker
xhost + 127.0.0.1
docker run -it --name m1 -e DISPLAY=host.docker.internal:0 -v /tmp/.X11-unix:/tmp/.X11-unix -v /Users/username/:/home/username/ molecfit_docker xterm -v means: mount directory of host system on directory of container: the first element is the directory in the host machine, the second in the container (does not need to exist). "m1" is the name we assign to the new container instance, while "molecfit_docker" is the name of the image created in the import step above. At this point, an xterm should open, and we are inside the container. Running /opt/molecfit/bin/molecfit_gui should open the Molecfit GUI interface. Remember that /home/username/ in the container is the same as /Users/username/ in the host (Mac) system, so be careful if you wish to delete anything.
All files created in /home/username/ will also be in /Users/username/, so they will remain there after you close or even delete the container.
When finished, exit from the container and type xhost - 127.0.0.1
docker images
docker container ls -a
docker container rm <CONTAINER_ID> # where <CONTAINER_ID> is the alphanumerical hash
docker image rm <IMAGE_ID>
docker start <CONTAINER_NAME>