2. CITS4012 MISC Enviornment¶
2.1. Frequently encounted problems in Windows¶
File not found when files are actually there - this might be to do with the limitation of path length (<=260 characters) in Windows. See below for a solution
When trying to install some pip packages you may get the error stating:
Microsoft Visual C++ 14.0 is required. Get it with “Build Tools for Visual Studio”: https://visualstudio.microsoft.com/downloads/
Scroll down the page to find “All Tools”, expand “Tools for Visual Studio 2019” and find “Build Tools for Visual Studio 2019”, download and install as an admin for all users.
Warning: The installation of the Build Tools might take a while (~20mins).
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.
Download the environment YAML file here: cits4012_py37.yml
conda env create -p c:\envs\cits4012_py37 --file cits4012_py37.yml
If this is successful, you can ignore the rest of the steps below.
2.3. Install step by step¶
2.3.1. Create a new environment¶
conda create -p c:\envs\cits4012_py37 python=3.7
conda activate c:\envs\cits4012_py37
2.3.2. Install Flair¶
Flair requires different versions of numpy and torch, so it is better to isolate it from the normal environment
pip install flair
2.3.3. Install Neuralcoref¶
Follow the “compile from source instruction” on the github page as it requires Python 3.7 and Spacy 2.0+
git clone https://github.com/huggingface/neuralcoref.git
cd neuralcoref
pip install -r requirements.txt
pip install -e .
You may run into the frequent problem 2 above. Solve it by installing C++ compiler suitable for your OS.
2.3.4. Install Jupyterlab¶
pip install jupyterlab
2.3.5. Install Matplotlib¶
pip install matplotlib
2.3.6. Export Environment Files¶
conda env export -p c:\envs\cits4012_py37 --no-builds -f cits4012_py37.yml