Installing MEEP on Linux Subsystem #2423
Aydin1992
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Install Ubuntu (with WSL version 2): use Microsoft store to download and install distro
https://learn.microsoft.com/en-us/windows/wsl/install
https://towardsdatascience.com/setting-up-a-data-science-environment-using-windows-subsystem-for-linux-wsl-c4b390803dd
Install Conda (Miniconda):
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p miniconda3
export PATH=miniconda3/bin:$PATH
---- path to miniconda3 bin folder2.1 In case if the base (root) doesn't appear in the terminal:
~/miniconda3/bin/conda init bash
(recommended)~/miniconda3/bin/conda init zsh
(recommended)or
export PATH=/home/<user /miniconda3/bin:$PATH
or
source /home/<user /miniconda3/bin/activate
This command will add the command in " " to bashrc file, so every time ubuntu starts, the code will be executed:
echo "source /home/<user /miniconda3/bin/activate" >> ~/.bashrc
-https://meep-hr.readthedocs.io/en/stable/Installation/
or
-https://meep.readthedocs.io/en/latest/Installation/ (recommended)
The codes are copied here for convenience (3.1 and 3.2).
3.1 Meep:
conda create -n meep -c chogan -c conda-forge pymeep
source activate pmeep
or
conda create -n meep -c conda-forge pymeep pymeep-extras
(recommended)source activate meep
3.2 Parallel Meep:
conda create -n pmeep -c chogan -c conda-forge pymeep-parallel
source activate pmeep
or
conda create -n pmeep -c conda-forge pymeep=*=mpi_mpich_*
(recommended)source activate pmeep
conda install -c conda-forge <some-package>
4.1 install jupyterlab on meep environment
conda activate meep
conda install -c conda-forge jupyterlab
4.1.1 Access to Jupyter
conda activate meep
jupyter lab --no-browser
jupyter notebook --no-browser
Copy the the URL to your browser in windows.
4.2 Install Spyder
conda activate meep
conda install -c conda-forge spyder
conda install -c conda-forge ipython_genutils
conda install -c conda-forge spyder-kernels
4.2.1 Run Spyder on Mobaxterm (recommended):
Install Mobaxterms from https://mobaxterm.mobatek.net/download-home-edition.html
Run the following codes:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libxcursor-dev
sudo apt-get install alsa
sudo apt install libegl1-mesa libegl1
sudo apt-get install python3-pyqt5.qtwebkit
Spyder
visit: https://www.youtube.com/watch?v=gByRjL1HWII&ab_channel=ValeriaItzelArteagaMu%C3%B1iz if the display didn't work for spyder
4.2.2 Run Spyder on X-server:
Install VcXsrv on windows from: https://sourceforge.net/projects/vcxsrv/
Run the followng codes:
sudo apt-get install libxcursor-dev
sudo apt-get install alsa
sudo apt install libegl1-mesa libegl1
open .bashrc file as text or try the following code:
nano ~/.bashrc
copy and paste the following codes to the end of .bahsrc file:
export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2 /dev/null):0
export LIBGL_ALWAYS_INDIRECT=1
export QT_QPA_PLATFORM=offscreen
save the text file: (press Ctrl-X, then press y and the enter key if you used "nano ~/.bashrc" code)
Lunch VcXsrv and set the display number to 0 and select multiple windows
Enable the connection from public and private networks to VcXsrv from Firewall Setting
spyder
conda activate meep
conda install -c conda-forge libgcc3
conda install -c conda-forge gsl
In the Jupyter lab or Spyder you should be able to see a waveguide and Ez-field distribution. Amazing!!!!
Tested on subsystem Ubuntu 20.04 LTS on windows 10.
visit following websites for more information on Meep installation:
1. https://novelresearch.weebly.com/installing-meep-in-windows-8-via-cygwin.html
2. http://jdj.mit.edu/wiki/index.php?title=Meep_Installation&printable=yes
3. https://www.youtube.com/watch?v=pxIJTGiBdWs
4. http://lordamit.blogspot.com/2011/10/tutorial-meep-in-ubuntu-complete.html?view=classic
5. https://www.fzu.cz/~dominecf/meep/
Beta Was this translation helpful? Give feedback.
All reactions