Installation & Setup

Author

Himanshu Poswal

Published

February 24, 2025

Installation & Setup:

To get started with scikit-image, follow these steps:

1. Install Python

Ensure you have Python installed. You can download the latest version from Python’s official website and follow the installation instructions for your operating system.

To verify the installation, run:

python --version

3. Install scikit-image

Use pip to install scikit-image:

pip install scikit-image

You may also need to install dependencies like numpy, matplotlib, and scipy:

pip install numpy matplotlib scipy

4. Verify Installation

After installation, open a Python shell and run:

import skimage
print(skimage.__version__)

If no errors appear and a version number is printed, the installation was successful.

5. Installing Jupyter Notebook (For Interactive Development)

If you want an interactive development environment, install Jupyter Notebook:

pip install notebook

Then, launch it using:

jupyter notebook

6. Running Your First scikit-image Program

Create a Python script or Jupyter Notebook and test loading an image:

import matplotlib.pyplot as plt
from skimage import io

image = io.imread('https://upload.wikimedia.org/wikipedia/commons/8/89/Portrait_Placeholder.png')
plt.imshow(image)
plt.axis('off')
plt.show()

If an image is displayed without errors, your setup is complete!