3fon3fonov / exostriker

Transit and Radial velocity Interactive Fitting tool for Orbital analysis and N-body simulations: The Exo-Striker
MIT License
122 stars 20 forks source link

For all Windows users, who use the "Windows Subsystem for Linux" (WSL), please read!!! #106

Open 3fon3fonov opened 2 years ago

3fon3fonov commented 2 years ago

I decided to post the installation sequence on Windows 10 & Windows 11 here. As of June 13, 2022 it goes like this:

  1. ################################ WSL & WSL2 ######################################

Installation on Windows 10 and 11 works only troughs the "Windows Subsystem for Linux". Please follow this guide:

https://docs.microsoft.com/en-us/windows/wsl/install

Follow all the steps carefully! This way you will be able to run all Linux native programs on your WINDOWS 10 & 11 bash shell, which is very useful in general!

Please install the Ubuntu 20.04 LTS !!!

  1. ################################ XServer on your Windows ###############################

To make The Exo-Striker work, however, you also will need an XServer installed. Follow these instructions carefully:

https://seanthegeek.net/234/graphical-linux-applications-bash-ubuntu-windows/

  1. ################################ Update the kernel ###############################

Let's assume you have installed the Ubuntu 20.04 LTS app on your Windows OS. Now open the app and update the Linux kernel

$ sudo apt update 
$ sudo apt dist-upgrade -y 

When done, install the following lines:

$ sudo apt install build-essential curl git gfortran gcc+ csh xterm

  1. ################################ Fix the Qt libraries ###############################

For some unknown reason, some qt binaries in Ubuntu 20.04+ are missing. Just in case, run all these commands:

$ sudo apt install libxcb-xinerama0
$ sudo apt install libxkbcommon-x11-0
$ sudo apt install qt5-default
  1. ################################ Install Python3.8 and pip3.8 ###############################

Python3.8+ is strongly recommended!!! On your WSL on Windows and Ubuntu 20.04, you will likely have python3.8.2 installed, but to install the newest python3.8.13 alongside your system python3.8.2 you can try these instructions (for 18.04 but should be OK for 20.04):

https://linuxize.com/post/how-to-install-python-3-8-on-ubuntu-18-04/

Let's assume, you have python3.8, then it is recommended to install pip3.8:

$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python3.8 get-pip.py
  1. ################################ Install python-dev ###############################

For yet another unknown reason, a fresh Ubuntu 20.04 does not include the Python Development files.

$ sudo apt install python3-dev

  1. ################################ Install the Exo-Striker ###############################

At this point, your system should be clean of all problems preventing the Exo-Striker being installed. Keep in mind, your python3.8 system is likely quite "empty". To install all the dependencies in one-go, the recommended way is:

$ pip3.8 install git+https://github.com/3fon3fonov/exostriker --user /for user installation -- recommended !!!!!!/

Then just run:

$ exostriker

If the GUI looks like this:

bad_screen

Then your Screen scaling is probably 150%. Go to "Change the resolution of the display" and reduce it to 100% and the GUI will look fine like this:

good_screen

I hope this not-so-short guide helped!

################################ Bonus tip ###############################

I generally recommend to work with git clone / git pull to always get the new version: E.g.,

$ cd ~
$ git clone https://github.com/3fon3fonov/exostriker
$ cd exostriker
$ python3.8 exostriker_gui.py 

The latter command will open the GUI inside the root "exostriker" directory and will be easy to find your sessions and files. One can even rename the directory:

$ mv exostriker exostriker_GL486 or

$ cp -r  exostriker exostriker_GL486
$ cp -r  exostriker exostriker_GL876
$ cp -r  exostriker exostriker_GL1148

etc.,

I.e., your analysis of GL486 will be stored in ~/exostriker_GL486. To work and/or update the repo:

$ cd exostriker_GL486 
$ git pull 
$ python3.8 exostriker_gui.py 

If problems occur:

$ python3.8 exostriker_gui.py -debug

,and open an issue here.

Leny73 commented 2 years ago

On step 2 configuring the XServer on your Windows there might be a problem with connecting the linux kernel with the server. Pay attention to configuration of the server. If you experience an error of type : Could not connect to display :0.0 Could not connect to any X display.

There is a workaround https://github.com/microsoft/WSL/issues/4793#issuecomment-577232999.

3fon3fonov commented 1 year ago

This tutorial is ONLY for version < 0.85, and ES running on linux subsystem for WIN.