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

Practical 1 Python Env Setup

The document provides instructions for setting up a Python environment and installing Jupyter Lab on Windows and MacOS for a data management and mining practical. It details downloading Python from the official website, checking the installation, installing pip and other common packages like NumPy, SciPy, scikit-learn, matplotlib, pandas. It also explains launching Jupyter Lab to get started with coding.

Uploaded by

ankur.ghosh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Practical 1 Python Env Setup

The document provides instructions for setting up a Python environment and installing Jupyter Lab on Windows and MacOS for a data management and mining practical. It details downloading Python from the official website, checking the installation, installing pip and other common packages like NumPy, SciPy, scikit-learn, matplotlib, pandas. It also explains launching Jupyter Lab to get started with coding.

Uploaded by

ankur.ghosh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

17th Jan 2022 elayne.ruane@ucd.

ie

MIS41270 – Data Mgmt & Data Mining

Practical 1
Your task today is to set up your Python Environment and Jupyter Lab for practicals and
assignments during the module.

Important Points To Note


1. You should not leave today without setting up your environment as we won’t be
spending time on this in future practicals.
2. If you already have Python and Jupyter Lab set up you’re free to go
3. Please note, you will need admin privileges on your machine to install Python. If you
cannot install Python (e.g. if you are using a company-issued laptop and lack the
required privileges) you can use a cloud-based solution such as Google Cloud, AWS,
or other services with free tiers.
4. You can use R, or another language, but code examples and support during the
module will only be provided for Python
5. You should install a recent version of Python 3, and not Python 2

Windows Steps:

1. Go to: https://www.python.org/ This is the official Python Website. Go to


Downloads and download the installer
2. Run the executable installer. !Important: make sure you select the following checkboxes:
a. Install launcher for all users
b. Add Python 3.7 to PATH. Adding Python to your PATH (see Environment Variables)
tells windows where to find the Python interpreter.
3. Restart your system.
4. Now check that you have installed Python successfully. Open a command prompt
and type:
Python –version
17th Jan 2022 [email protected]

5. If Python has not been installed, check your Environment Variables and add the
location of your Python installation to your PATH manually. Then restart your PC.
The location will look something like:
C:\Users\Username\AppData\Local\Programs\Python\Python39
6. You should also install Pip, Python’s package manager. It should come with the latest
Python download. Run either of the following commands in your terminal (cmd) to
check:
pip –version
pip help
7. If pip has not been installed, you can follow these instructions to get it:
a. https://phoenixnap.com/kb/install-pip-windows
8. Check to see IDLE has also been installed by searching “IDLE” in your start menu. You
can also take this chance to install an IDE like PyCharm or Atom if you prefer them.

MacOS Steps:
1. Open Terminal and run the command python
2. If the version you see is Python 2, run the command python3
3. If Python 3 isn’t installed, you can install homebrew and use that to install Python.
See here: https://www.freecodecamp.org/news/python-version-on-mac-update/
4. Homebrew will install pip, Python’s package manager, when it installs Python. Check
by running the command pip –version or you can also use pip help
5. If pip has not been installed, see the instructions here:
https://www.geeksforgeeks.org/how-to-install-pip-in-macos/
6. Check to see IDLE has been installed correctly by Homebrew by finding it in the
Launchpad and or typing idle in the terminal. You may need to type idle3
7. Install any IDE you like e.g PyCharm or Atom.
17th Jan 2022 [email protected]

Install Python Packages


Now you should “pip install” some useful and commonly used Python packages. In your
command line terminal, run the following commands (if you’re on mac use pip3 instead of
pip):

pip install numpy


pip install scipy
pip install scikit-learn
pip install matplotlib
pip install pandas
pip install jupyterlab

Open JupyterLab
Run the command jupyter lab in the terminal to launch. Note, only Firefox, Chrome,
and Safari are officially supported browsers.
Write some hello world or other code in your .ipynb (Jupyter Notebook) to get comfortable.

You might also like