0% found this document useful (0 votes)
47 views

PChem3 Tutorial Setting Machine

Uploaded by

Suhyun Lee
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

PChem3 Tutorial Setting Machine

Uploaded by

Suhyun Lee
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Physical Chemistry 3 Spring 2024, SNU

Chapter 1

Setting up your machine

This chapter illustrates how to set up your machine for the Python tutorial and programming sessions
in the Physical Chemistry 3 course. You can use your own machine, whether it operates on Windows or
MacOS (refer to Section 1.1 or 1.2). Alternatively, you can explore the elice service provided by Seoul
National University, which allows access to computing resources via web browsers, featuring Visual
Studio Code web UI (refer to Section 1.3).

1.1 Setting up your Windows machine


Installing anaconda
For convenience, we will utilize package and virtural environment managing tool, anaconda . If you
have already installed anaconda, you may pass this subsection.

» Go to https://anaconda.com, and click free downlaod on the right upper side.

Figure 1.1: Main page of the anaconda website.

3
Physical Chemistry 3 Spring 2024, SNU

» Then Download page will appear. Download the installer.

Figure 1.2: Download page of the anaconda website.

» Execute the installer. Do not change the options, and just proceed to the next step by just clicking
yes. Especially, do nothing here:

Figure 1.3: These are the default options. Do not check or uncheck something.

Now wait for a couple of minutes.

» After the installation is completed, launch anaconda navigator. From there, you can launch var-
ious types of anaconda-related programs. You can also launch jupyter notebook by clicking the
logo.

» Anaconda Powershell Prompt is the useful tool for you. When I say terminal, you should under-
stand as anaconda powershell prompt, from now on. Execute anaconda powershell prompt from
the anaconda navigator, or search it in the applications.

4
Physical Chemistry 3 Spring 2024, SNU

Figure 1.4: Anaconda navigator.

Creating a new virtual environment


Now, create a new virtual environment. Utilizing a virtual environment allows you to manage package
versions and dependencies easier. Generate new virtual environment with conda create . Then activate
it with conda activate command. Copy and paste following commands in the anaconda powershell
prompt, and execute them. If the program asks you to proceed or not, type y and press enter to confirm.

Code 1.1: Setting a virtual environment.


1 conda create -n PChem3
2 conda activate PChem3

Installing Python
For the consistency, install specific version of Python. Codes for tutorials and practice sessions are not
tested for all possible Python versions, so different version of Python may show unexpected behaviors.
If the program asks you to proceed or not, type y and press enter to confirm.

Code 1.2: Python installation.


1 conda install -c conda-forge python==3.11.8
2 python --version # check the installation version

Installing jupyter notebook


Jupyter notebook provides convenient interactive notebook environment. If the program asks you to
proceed or not, type y and press enter to confirm.

Code 1.3: Jupyter notebook installation.


1 conda install -c conda-forge jupyter notebook

Now you are all set! To execute jupyter notebook, type jupyter notebook in the anaconda powershell
prompt, while you are in the directory that contains Python tutorial codes or the programming session
codes.

⚠️ Warning. Do not forget to activate your virtual environment PChem3 every time you open the ana-
conda powershell prompt.

5
Physical Chemistry 3 Spring 2024, SNU

1.2 Setting up your MacOS & Linux machine


If you have a Mac, you can find the built-in Terminal app in the Launchpad. If you are using a Linux
machine, you likely don’t need an explanation of how to open the terminal, as you’re probably more
adept at navigating computers than I am.

Figure 1.5: The terminal icon, built-in app in MacOS.

Installing mamba
For convenience, we will utilize package manager mamba. You can also install anaconda instead, but
we recommend using mamba since it is much faster than anaconda.

⚠️ Warning. If you had already installed conda in your machine, do not install mamba (again). This
action will overwrite some important Python settings and mess up your environmental variables. Just
skip to Creating a new virtual environment.

Copy, paste the following code into your terminal and execute it. If the program asks you to proceed or
not, type y and press enter to confirm.

Code 1.4: Downloading and installing mamba.


1 curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname
-m).sh"
2 bash Miniforge3-$(uname)-$(uname -m).sh

Follow the instructions displayed on the terminal. Restart your terminal once after the installation.

Creating a new virtual environment


Now, create a new virtual environment. Utilizing a virtual environment allows you to manage package
versions and dependencies easier. Generate new virtual environment with mamba create command (or,
if you are using conda , replace all mamba into conda ). Then activate it with mamba activate command.
If the program asks you to proceed or not, type y and press enter to confirm.

Code 1.5: Setting a virtual environment.


1 mamba create -n PChem3
2 mamba activate PChem3

Installing Python
For the consistency, install specific version of Python. Codes for tutorials and practice sessions are not
tested for all possible Python versions, so different version of Python may show unexpected behaviors.
If the program asks you to proceed or not, type y and press enter to confirm.

6
Physical Chemistry 3 Spring 2024, SNU

Code 1.6: Python installation.


1 mamba install -c conda-forge python==3.11.8
2 python --version # check the installation version

Installing jupyter notebook


Jupyter notebook provides convenient interactive notebook environment. If the program asks you to
proceed or not, type y and press enter to confirm.

Code 1.7: Jupyter notebook installation.


1 mamba install -c conda-forge jupyter notebook

Now you are all set! To execute jupyter notebook, type jupyter notebook in the terminal, while you are
in the directory that contains Python tutorial codes or the programming session codes.

⚠️Warning. Do not forget to activate your virtual environment PChem3 every time you open the termi-
nal.

1.3 elice service in eTL


Access coding learning platform through the eTL. Then you can access the VS code web UI like this. You
can open terminal by clicking the three-line button on the upper left side.

Figure 1.6: Opening terminals in elice service.

We provide pre-set environment here, so you don’t need additional setting.

You might also like