Python para Data Science e Analytics
Python para Data Science e Analytics › Guides › How to Install Jupyter Notebook: Anaconda and pip, Step by S

How to Install Jupyter Notebook: Anaconda and pip, Step by Step

You can install Jupyter Notebook in two main ways: with Anaconda, which bundles Python, Jupyter, and common data libraries in one installer, or with pip inside a virtual environment you create yourself. Both work, and the difference shows up later in how you manage packages. The most common mistake is not the install itself, but opening the notebook in a different environment from the one where you installed the libraries.

Topics: Jupyter, instalação

How Do I Install Jupyter Notebook with Anaconda?

Anaconda is a Python distribution built for data analysis: one installation gives you the interpreter, Jupyter Notebook, JupyterLab, and widely used libraries such as NumPy and Pandas. For a beginner, it is the path with fewer manual steps, because you do not need to create an environment or install each data package before your first session.

Download the installer from the official Anaconda site, choose the version for your operating system, and follow the setup wizard. On Windows, the installer asks whether to add Anaconda to PATH; the documentation recommendation is to leave that option unchecked and use the Anaconda Prompt for terminal commands.

After installation, open Anaconda Navigator and click Jupyter Notebook. Your browser opens in the folder where you started. To create a new file, use New > Notebook and select the Python kernel.

A quick test for the first session: type `import numpy as np` and `import pandas as pd` in a cell and run it with Shift+Enter. If no error appears, the base environment is ready for data manipulation lessons.

How Do I Install Jupyter Notebook with pip Only?

pip is the package manager that comes with Python. It is the choice for people who already have Python installed, want a lean environment, or need precise control over library versions. Here, the step you cannot skip is the virtual environment: it isolates your project installations from the machine's global installations.

Create the environment with `python -m venv .venv`, activate it with `.venv\Scripts\activate` on Windows or `source .venv/bin/activate` on Linux and macOS, upgrade pip with `python -m pip install --upgrade pip`, and install Jupyter with `pip install notebook`. For the newer interface, use `pip install jupyterlab`.

To open the notebook, prefer `python -m notebook` instead of typing only `jupyter notebook`. The command with `python -m` uses exactly the interpreter of the active environment, which avoids many path problems.

Then install the analysis libraries in the same active environment with `pip install numpy pandas matplotlib`. The order — activate the environment, install Jupyter, install the libraries — is what keeps everything consistent.

Why Can't Jupyter Find the Libraries I Installed?

This is the most frequent environment error. Jupyter is only the interface; the code runs in a kernel, which is a specific Python interpreter. If you installed Pandas in one environment and opened the notebook from another, `import pandas` fails with ModuleNotFoundError even when the package is installed on the machine.

The classic case: the person installs libraries with pip in the system Python but opens Jupyter through Anaconda, whose base environment is different. The reverse also happens — installing through Anaconda and opening a notebook in a virtual environment created with venv.

Inside the notebook, run `import sys; print(sys.executable)`. The path shown is the interpreter the kernel is actually using. Compare it with the path of the environment where you installed the packages; if they differ, you have found the problem.

The fix is to install into the environment the kernel uses, not the one the terminal uses. A safe way to do this from inside the notebook is to run `!{sys.executable} -m pip install pandas`, because the command reuses the kernel's own interpreter. Restart the kernel after installation.

Which Installation Should You Choose for a Data Science Course?

Choose Anaconda if you want the first notebook open with fewer manual steps and the main data libraries already available. It is also convenient when you do not want to manage separate environments before the first lesson.

Choose pip if you already have Python, want a smaller setup, or need to control library versions closely. The trade-off is that you must create and activate a virtual environment and install packages yourself.

Neither method is automatically better. The practical difference is how much environment management you want to do up front. For a course, the important rule is to follow one method consistently and know which interpreter your kernel is using.

Where Does Jupyter Notebook Fit in the Python for Data Science and Analytics Course?

The Python for Data Science and Analytics course covers IDE and Jupyter Notebook installation in its basic module, then moves through basic functions, NumPy and Pandas, user-defined functions, loops and conditionals, data visualization, data cleaning and preparation, and outlier detection.

The advanced part covers machine learning: linear and logistic regression, K-Means, SVM, Naive Bayes, decision tree, Random Forest, Gradient Boosting, XGBoost, LightGBM, feature selection, and cross-validation. It closes with a final project: end-to-end exploratory analysis and machine learning.

Lessons are recorded in high quality and watched at the student's pace. The course includes real market projects for a portfolio, guided practice exercises, a certificate of completion, a private community for networking, and unlimited access with no expiration date. It does not require prior programming knowledge.

Official short description: Python for Data Science and Analytics course, from zero to advanced, with a machine learning project, exercises, certificate, and permanent access. The price is R$ 470, or 12 card payments of R$ 20.37, paid through the Hotmart checkout by card or boleto. You can see the course at python.paanalytics.net and start at the Hotmart checkout.

Install Jupyter and begin Python for data science from zero

Secure payment via Hotmart, up to 12 installments.

Enroll now Product site

Frequently asked questions

Do I need to know Python before installing Jupyter Notebook?

No prior programming knowledge is required to start the course; it begins from zero. The installation itself still requires following installer or terminal steps, and the course covers IDE and Jupyter Notebook installation in the basic module.

Should I install Jupyter Notebook or JupyterLab?

Both can open .ipynb notebooks. Jupyter Notebook is the classic notebook interface; JupyterLab is a newer interface with tabs and panels. Anaconda includes both, and pip can install either. Follow the course instructions so your screen matches the lessons.

Can I install packages from inside a notebook?

Yes. Use `!{sys.executable} -m pip install package-name` in a cell and restart the kernel afterward. This installs into the same interpreter the kernel is using, which prevents the usual environment mismatch.

How do I fix ModuleNotFoundError in Jupyter?

Print `sys.executable`, compare it with the environment where you ran pip, and install the package in the kernel's environment. Then restart the kernel and rerun the import cell.

Does the course include Jupyter installation, certificate, and permanent access?

Yes. The course covers IDE and Jupyter Notebook installation, includes a certificate of completion, and gives unlimited access with no expiration date. It also includes guided exercises, a community, and a final machine learning project.

Ler em português →