layout | title | nav_order |
---|---|---|
default |
Python Setup |
3 |
If you are not using Google Colab, you will need to setup a working Python environment with all the necessary dependencies. You only need to do this once. There are alternative approaches to setting up your machine, but the approach outlined here is guaranteed to work and is reproducible. Your instructors would be better able to assist if there are issues in the installation.
- Download the Python 3.11+ version of Miniconda (recommended) or Anaconda for your OS.
- Follow the official instructions and install Miniconda/Anaconda.
- Start the terminal (Mac/Linux) or Anaconda Prompt (Windows).
- Create a virtual environment for NANO181/281:
conda create --name NANOx81 python=3.11
- Activate the virtual environment.
conda activate NANOx81
- Install the necessary Python libraries.
conda install --yes numpy scipy matplotlib pandas jupyter seaborn scikit-learn
pip install pymatgen --upgrade
- An alternative to steps 4-6 is to download the nanox81_env.yml file from the Github repo and create the environment directly.
conda env create -f nanox81_env.yml
- Subsequently, always activate your NANO181/281 environment prior to working on your lectures/labs using:
conda activate NANOx81
If for any reason you find that your conda environment is corrupted and you need to start over, please run:
conda env remove --name NANOx81
and simply start from step 4 above to redo your setup.