esciencecenter-digital-skills / parallel-python-workshop

Environment for the Parallel Python workshop
Apache License 2.0
6 stars 7 forks source link

setup on windows #1

Open mkuzak opened 3 years ago

mkuzak commented 3 years ago

In order for this lesson to work on windows, we need two things working in the same environment:

  1. Python (via anaconda)
  2. unix shell (via GitBash)

That can be done by making Conda environment working in GitBash. I managed to get it to work by following steps below:

  1. Install GitBash following instructions from Software Carpentry
  2. Install Anaconda following instructions from Software Carpentry. Remember the path where conda is being installed.
  3. Open GitBash and execute the rest in the GitBash command line.
  4. Add conda.sh to bash profile. This script should be located in anaconda/etc/profile.d/conda.sh. The absolute path most likely to be /c/Users/[username]/anaconda3/etc/profile.d/conda.sh where [username] is your windows account username. You can add this path to the profile by executing echo ". /c/Users/[username]/anaconda3/etc/profile.d/conda.sh" >> ~/.profile.
  5. then follow instructions starting with conda env create -f environment.yml.
sebranchett commented 3 years ago

Hi Mateusz, I am running on Windows 10 with git bash and anaconda, following Software Carpentry set-up.

conda install -y graphviz doesn't seem to do much.

conda install -y python-graphviz gets the visualisation working for episodes 1-4 of: https://carpentries-incubator.github.io/lesson-parallel-python but doesn't help with episode 5 on snakemake, this repo. The problem occurs at 'Challenge: create a dependency diagram' with the command: snakemake --dag | dot | display

To get dot to work: Download graphviz from: https://www2.graphviz.org/Packages/stable/windows/10/msbuild/Release/Win32/ unzip e.g. to C:\Graphviz add path\bin to PATH: export PATH="/c/Graphviz/bin":$PATH

This then produces an image file: snakemake --dag | dot -Tpng > dag.png see also: https://coderefinery.github.io/reproducible-research/04-workflow-management/#solution-4-using-snakemake

You can then use: mspaint dag.png

or, to get display to work: https://imagemagick.org/script/download.php export PATH="/c/Program Files/ImageMagick-7.0.10-Q16-HDRI":$PATH command is then imdisplay NOT display: imdisplay dag.png

Hope this helps a bit. Happy Christmas!