1. CITS4012 Base Environment¶
1.1. IDEs and Git¶
1.1.1. Installing Visual Studio Code¶
64 bit System Installer (
VSCodeSetup-x64-1.57.1.exe
- 78KB)Default Installation Path (
C:\Program Files\Microsoft VS Code
)Installation Time (~5 mins)
1.1.1.1. Installing Extensions for Visual Studio Code¶
Remote - SSH Extension
Remote X11 (SSH) Extension
1.1.2. Install git¶
Don’t forget to add git to the system PATH
1.2. Conda and Unit Specific Packages¶
1.2.1. Installing Anaconda¶
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
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.
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¶
Test to see if the CITS4012_base environment is available from VSCode
1.2.3.3. Install Spacy¶
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
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¶
Click Start.
On the Start menu, click Run.
In the Open box, type “dxdiag” (without the quotation marks), and then click OK.
The DirectX Diagnostic Tool opens. …
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¶
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.
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.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