1. CITS4012 Base Environment

1.1. IDEs and Git

1.1.1. Installing Visual Studio Code

  • Visual Studio Code Download

  • 64 bit System Installer (VSCodeSetup-x64-1.57.1.exe - 78KB)

  • Default Installation Path (C:\Program Files\Microsoft VS Code)

  • Installation Time (~5 mins)

vscode_python_extension

1.1.1.1. Installing Extensions for Visual Studio Code

1.1.2. Install git

1.2. Conda and Unit Specific Packages

1.2.1. Installing Anaconda

  • Anaconda Installation Instructions

  • Individual Version (Anaconda3-2021.05-Windows-x86_64.exe - 488KB)

  • Installation Size (2.9 GB)

  • Installed for all users at C:\ProgramData\Anaconda3

  • Installation Time (~30 mins)

  • Launch Anaconda Navigator

anaconda_navigator

You can start a CMD or POWERSHELL console using the navigator, or following the steps 1 and 2 in the screenshot below to start a CMD or POWERSHELL. If you are intalling packages, you can right click the arrow to bring up a pop-up menu, run as adminstrator (Step 3a) or pin on taskbar (Step 3b) for future convenience.

conda_powershell

1.2.2. Install from an environment YAML file

If we install from this YAML file, then we can ignore all the following steps after this section.

First download the installation file here: cits4012.yml

conda env create -p c:\envs\cits4012 --file cits4012.yml

If this is successful, you can ignore the rest of the steps below.

1.2.3. Install packages step by step from scratch

1.2.3.1. Create Anaconda Environment

Need admin access to write to C drive (Run Conda Powershell as Administrator - right click on the icon)

conda create -p c:\envs\cits4012 python=3.8
conda activate c:\envs\cits4012

1.2.3.2. Use the virtual environment in VSCode

1.2.3.3. Install Spacy

  1. Go back to Conda CMD.exe, check to see if you have pip installed using

conda list
pip install -U spacy
python -m spacy download en_core_web_sm
  1. Find the Spacy version (we want v3+):

# Windows CMD
C:\> conda list | findstr "spacy"`

# Windows PowerShell
C:\> conda list | Select-String "spacy"

# Linux
$ conda list | grep "spacy"

1.2.3.4. Install PyTorch

1.2.3.4.1. Check for Cuda compatible Graphics Card on Windows
  1. Click Start.

  2. On the Start menu, click Run.

  3. In the Open box, type “dxdiag” (without the quotation marks), and then click OK.

  4. The DirectX Diagnostic Tool opens. …

  5. On the Display tab, information about your graphics card is shown in the Device section.

My laptop has NVIDIA GeForce MX130.

1.2.3.4.2. Install Pytorch

Pytorch Website

  • with GPU

conda install pytorch torchvision torchaudio torchtext cudatoolkit=11.1 -c pytorch -c conda-forge
  • CPU only

conda install pytorch torchvision torchaudio torchtext cpuonly -c pytorch -c conda-forge
1.2.3.4.3. Install Tensorboard
conda install -c conda-forge tensorboard
1.2.3.4.4. Install GraphViz on Windows

2.47.3 EXE installer for Windows 10 (64-bit)

Download the exe file and install, make sure it is added to the system PATH (Windows - Edit the Windows Environment Variables.

GraphVizInstall
1.2.3.4.5. Install torchviz
pip install torchviz

1.2.3.5. Install NLTK

pip install nltk

and then download the data and models

python -m nltk.downloader -d c:\envs\cits4012\nltk_data all
1.2.3.5.1. Install truecase

install this after NLTK installation pls.

pip install truecase

1.2.3.6. Install Jupyterlab

conda install -c conda-forge jupyterlab

1.2.3.7. Install Scikit-learn

pip install -U scikit-learn

Verify if it works:

python -c "import sklearn; sklearn.show_versions()"

1.2.3.8. Install Matplotlib

pip install matplotlib

1.2.3.9. Install gensim

Note this will install the latest gensim 4.x

conda install -c conda-forge gensim

1.2.3.10. Install import-ipynb

This is a package to import functions from other Jupyter Notebooks.

pip install import-ipynb

1.2.3.11. Install Python Levenshtein Similarity

pip install python-Levenshtein

1.2.3.12. Install interactive visualisation bokeh

pip install bokeh

1.2.3.13. Install bs4 to get BeautifulSoup for web crawling

pip install bs4

1.2.3.14. Finally Export Environment into an YAML file

conda env export -p c:\envs\cits4012 --no-builds -f cits4012.yml