This is a guide to installing and running improv on Windows systems using Windows Subsystem for Linux (WSL)
After completing the following WSL installation, the WSL shell can be activated by the wsl
command in Command Prompt.
-
Enable WSL via Powershell as administrator
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
-Be sure to install WSL 1 instead of WSL 2 due to unresolved network connectivity issues. In order to downgrade from WSL 2 to WSL 1, execute
wsl --set-version <distro-name>
-
Restart system
-
Install Ubuntu 18.04 (or other distro) from Windows Store
-
Initialize distro
- Set username, password when prompted
WSL files can be accessed through the path: ~
, which is equivalent to /home/[USER]
, within the WSL shell. Windows files, specifically the C: drive can be accessed through the path: /mnt/c
. For RASP purposes, only the plasma store and the anaconda environment used to execute RASP is within the WSL system. The RASP code is located within Windows file system.
Furthermore, certain directories must be added to the PATH environmental variable in Linux in order for RASP to run properly. Below are the steps to "permanently" adding to the Linux $PATH.
- Use vim to edit
~/.profile
vim ~/.profile
- Add
export PATH="[PATH]:$PATH"
to end of~/.profile
- Restart WSL shell
- Find latest version of Anaconda 3 for Linux
- Install latest version within WSL
wget https://repo.continuum.io/archive/Anaconda3-[VERSION]-Linux-x86_64.sh
- Run installation script
bash Anaconda-[VERSION]-Linux-x86_64.sh
- Opt to install Visual Studio Code when prompted
- Update Anaconda if prompted or if necessary
conda update anaconda
- Add Anaconda to
$PATH
(see Section I)export PATH="~/anaconda3/bin:$PATH"
- Download and install VcXsrv
- Run XLaunch
- Set Display number to "0"
- Select Disable access control
- Keep other default settings
- Allow access through Windows firewall if prompted
- Use vim to set display in
~/.profile
(See Section 1)export DISPLAY=:0
- Clone improv
git clone https://github.com/pearsonlab/improv
- Clone improv submodules
git submodule update --init
- Create Anaconda environment
This creates a new anaconda environment namedcaiman
using Python 3.6, which can be used for improv installations and executions. Execute the following command in the CaImAn dir.conda env create -f environment.yml -n caiman conda activate caiman
- Install CaImAn module
Execute the following command within the CaImAn directory andcaiman
env.pip install -e .
- Install the following dependencies.
- pyarrow
- pyqtgraph
conda install [PACKAGE]
- Add pyarrow
plasma_store_server
to path (See Section I)
plasma_store_server
is most likely located in the bin directory of thecaiman
conda environment:~/anaconda3/envs/caiman/bin
. You can find where your environment is installed by enteringconda info --envs
.
See Common Issues for errors and missing dependencies that might need to be installed.
- Activate WSL
wsl
- Activate
caiman
environmentconda activate caiman
- Run XLaunch (see Section V)
- Run improv
python -m nexus.nexus demos/basic/basic_demo.yaml
If Ubuntu cannot be downloaded and installed from the Windows Store, it can be instead manually downloaded and installed through the following instructions.
- Go to https://docs.microsoft.com/en-us/windows/wsl/install-manual to download distro or https://aka.ms/wsl-ubuntu-1804 to directly download Ubuntu 18.04
- If running the .appx file downloaded does not successfully install, rename .appx extension to .zip and uncompress
- Run
ubuntu18.04.exe
or altenerative distro executable - Complete initialization and rest of installation
Several issues can appear during the CaImAn installation process. It is recommended that if any severe issues appear, one should delete and then recreate the caiman conda environment from scratch. Or, caiman can be uninstalled (pip uinstall caiman
) and installation can be reattempted. Some of the following issues might appear:
Aborted (core dumped)
when activating thecaiman
env- Solved by updating all packages
conda update --all
- Solved by updating all packages
Failed building wheel for caiman
:command 'gcc' failed with exit status 1
- This error could be due to gcc or g++ not being installed. Follow these steps to install both.
conda update -all sudo apt-get update sudo apt-get install gcc sudo apt-get install g++
- This error could be due to gcc or g++ not being installed. Follow these steps to install both.
-
ImportError: libGl.so.1: cannot open shared object file
- Solved by running the following
sudo apt-get update sudo apt-get install libgl1-mesa-glx
- Solved by running the following
-
ImportError: libopencv_reg.so.3.4: cannot enable executable stack as shared object
- Solved by running the following (second line contains path of opencv installation)
sudo apt-get update sudo apt-get install execstack sudo execstack -c ~/anaconda3/envs/caiman/lib/libopencv_*
- Solved by running the following (second line contains path of opencv installation)
-
This application failed to start because it could not find or load the Qt platform plugin "xcb"
- Solved by running the following
sudo apt-get update sudo apt-get install libqt5x11extras5
- Solved by running the following
-
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
- Solved by installing gcc and g++
conda update -all sudo apt-get update sudo apt-get install gcc sudo apt-get install g++
- Solved by installing gcc and g++