This directory contains scripts for installing the environment needed for the course and testing your machine to make sure you have the software you’ll need for your workshop installed. To use these scripts:
Linur or Mac
Download
If you are using Linux or Mac download:
swc-installation.sh
environment.yml
if Linux or Intel Macenvironment_apple_m.yml
if you are using a new apple mac M1 or M2
Install
If you have a Mac M1 or M2 chip, you first need to tell conda that you want to look for M1 and M2
versions first instead of Intel chip versions. Open up the .condarc
file located your home directory
in a text editor and add the following line to the file:
subdirs: osx-arm64
Then save the file and close the text editor.
If you are using Linux or Mac, find the directory where you downloaded the installation script and run the command from the shell.
$ bash swc-installation.sh
Proceed to the Setting up your environment section below.
Windows
Download
If you are running Windows, download:
Install
Click with the right button on the swc-installation.ps1
that you downloadedswc-installation.ps1
that you downloaded and select Run with PowerShell
. This may prompt a question about Change of policies, if so answer
Proceed to the Setting up your environment section below.
Setting up your environment
Once you have downloaded and installed, complete the following steps.
- The install script above will create an environment named ‘python_course’. Please
activate that environment with the following command:
$ conda activate python_course
-
Download swc-installation-test-1.py.
-
Run it from the shell:
$ python swc-installation-test-1.py Passed
-
Download swc-installation-test-2.py.
-
Run it from the shell:
$ python swc-installation-test-2.py check virtual-shell... pass ... Successes: virtual-shell Bourne Again Shell (bash) 4.2.37 ...
If you see something like:
$ python swc-installation-test-2.py check virtual-shell... fail ... check for command line shell (virtual-shell) failed: command line shell (virtual-shell) requires at least one of the following dependencies For instructions on installing an up-to-date version, see http://software-carpentry.org/setup/ causes: check for Bourne Again Shell (bash) failed: could not find 'bash' executable for Bourne Again Shell (bash) For instructions on installing an up-to-date version, see http://software-carpentry.org/setup/ ...
follow the suggestions to try and install any missing software. For additional troubleshooting information, you can use the
--verbose
option:$ python swc-installation-test-2.py --verbose check virtual-shell... fail ... ================== System information ================== os.name : posix ...