/CITS4012

Primary LanguageJupyter Notebook

1. IDEs and Git

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

Installing Extensions for Visual Studio Code

1.2 Install git

2. Conda and Unit Specific Packages

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

2.2 Install from an environment YAML file

If we install from this YAML file, then we can ignore all the following steps in Section 2.3.

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

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

2.3 Install packages step by step from scratch

Create Anaconda Environment

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

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

Use the virtual environment in VSCode

2.3.1 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"

2.3.2 Install PyTorch

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.

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

Install Tensorboard

conda install -c conda-forge tensorboard

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

Install torchviz

pip install torchviz

2.3.3 Install NLTK

pip install nltk

and then download the data and models

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

Install truecase

install this after NLTK installation pls.

pip install truecase

2.3.4 Install Jupyterlab

conda install -c conda-forge jupyterlab

2.3.5 Install Scikit-learn

pip install -U scikit-learn

Verify if it works:

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

2.3.6 Finally Export Environment into an YAML file

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