Install and Run BioExcel Building Blocks in Windows Subsystem for Linux
As some of the dependencies of our packages are not fully compatible with Windows, here we will explain how to install and run BioExcel Building Blocks in Windows 10 using the Windows Subsystem for Linux feature.
View tutorial in video
Please, click the button below if you want to view the content of this tutorial in video:
Install Ubuntu
First off, we will install Ubuntu in Windows 10. If you have it already installed you can skip this step.
Update: on October 2020, Microsoft has made it much easier to install WSL on Windows 10.
Enable Windows Subsystem for Linux
Before installing Ubuntu, we should enable Windows Subsystem for Linux:
- Open Start Menu
- Click on Settings
- Click on Apps
- Scroll down and click on Related settings > Programs and Features
- Go to the left menu and click on Turn Windows features on or off
- Scroll down and enable Windows Subsystem for Linux clicking on the left checkbox
Install Ubuntu terminal
Several Linux distributions can be installed, although we recommend to install Ubuntu 16.04 or 18.04. In the next link the installation instructions can be found:
https://docs.microsoft.com/en-us/windows/wsl/install-manual
Basic steps:
- Open Power Shell
- Download distribution:
curl.exe -L -o ubuntu-1604.appx https://aka.ms/wsl-ubuntu-1604
- Install distribution:
Add-AppxPackage .\ubuntu-1604.appx
Once the installation is finished, Ubuntu terminal is available in the Start Menu:
Install Anaconda
- Go to the official Anaconda website:
https://www.anaconda.com/download - Be sure that the Linux tab is selected, because as we are accessing the site from Windows, probably the Windows tab will be selected by default. Then copy the Download Python 3.x version link.
- Open Ubuntu terminal and download the link copied in the step above:
wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh .
- Now we have the file downloaded but we need to give it execution permissions:
chmod +x Anaconda3-2019.10-Linux-x86_64.sh
- Once we have execution permissions, let's execute the file and follow the installation instructions:
sh ./Anaconda3-2019.10-Linux-x86_64.sh
- When the execution is finished, try to execute conda in the Ubuntu terminal window. If it doesn't work, the path must be exported:
export PATH=/home/USER/anaconda3/bin:$PATH
Install Git
If you have Git installed (to test it, just type git in your Ubuntu terminal), please skip this step. If not, follow the next instructions to install it:
sudo apt update sudo apt install git
Run tutorial
Go to the tutorial and follow the instructions. As an exemple we have taken the Protein MD Setup tutorial:
https://github.com/bioexcel/biobb_wf_md_setup
Then, please follow the next steps:
- First off, download the tutorial cloning the project in your computer:
git clone https://github.com/bioexcel/biobb_wf_md_setup.git
- Go to the project folder:
cd biobb_wf_md_setup
- Create anaconda environment:
conda env create -f conda_env/environment.yml
- The creation of the environment will take some minutes. Once it's done, let's activate the environment:
conda activate biobb_MDsetup_tutorial
In some distributions, conda activate instruction doesn't work. If this is the case, please type:
source activate biobb_MDsetup_tutorial
- Activate Jupyter extensions:
jupyter-nbextension enable --py --user widgetsnbextension jupyter-nbextension enable --py --user nglview
- Open Jupyter Notebook:
jupyter-notebook biobb_wf_md_setup/notebooks/biobb_MDsetup_tutorial.ipynb
- Jupyter Notebook is a web-based interactive computational environment. When launching the above instruction the default browser is automatically launched. If this is not the case, copy all the address provided by Jupyter Notebook (with the long token included) and copy it to your browser:
[I 17:10:51.920 NotebookApp] Serving notebooks from local directory: /home/USER/projects/BioBB/tutorials [I 17:10:51.920 NotebookApp] The Jupyter Notebook is running at: [I 17:10:51.920 NotebookApp] https://localhost:8888/?token=71e022a6ac0f6e31efb37f4d12053a36bbfe7f22f0625266 [I 17:10:51.920 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 17:10:51.925 NotebookApp] To access the notebook, open this file in a browser: file:///home/USER/.local/share/jupyter/runtime/nbserver-29420-open.html Or copy and paste one of these URLs: https://localhost:8888/?token=71e022a6ac0f6e31efb37f4d12053a36bbfe7f22f0625266 Opening in existing browser session.
- Though the tutorial has been successfully tested in Internet Explorer 11, it's highly recommended to install Google Chrome or Mozilla Firefox for executing the tutorials in Windows 10. Some widgets will not work (e.g. NGLView) in Windows 10.