pip install qiskit
December 2, 2026
pip install qiskit installs the Qiskit SDK from PyPI into the Python that is active when the command runs. A Qiskit install is that command, followed by import qiskit in the same Python.
The current SDK on PyPI is the Qiskit 2.x line. It requires Python 3.10 or newer, and a 64-bit interpreter. The circuits on this site import QuantumCircuit, Statevector, and the QFT from that package, so this one install is what the later lessons use. Simulator extras such as qiskit-aer are a separate install and are not required here.
The steps below are the working install. The two sections after them cover the searches that usually follow a failed attempt: installing Qiskit inside Jupyter, and what to do when pip install qiskit prints an error.
pip install qiskit
Run pip install qiskit inside a virtual environment so the files land in a Python you control.
From the project folder:
python -m venv .venvActivate it.
- Windows Command Prompt:
.venv\Scripts\activate - Windows PowerShell:
.venv\Scripts\Activate.ps1 - macOS and Linux:
source .venv/bin/activate
Then install and print the version with the same interpreter:
python -m pip install -U pip
python -m pip install qiskit
python -c "import qiskit; print(qiskit.__version__)"python -m pip binds the install to that python. A bare pip on the PATH can belong to a different installation, which is a common reason the command looks successful and the import still fails.
Circuit drawings that use Matplotlib need one more package. The text diagrams in these lessons do not:
python -m pip install "qiskit[visualization]"IBM’s install notes, including the current list of supported operating systems, are in the Install Qiskit guide. Check the Qiskit page on PyPI when you want the Python versions the latest release accepts.
How to install Qiskit in Jupyter
Installing Qiskit in Jupyter means installing it into the kernel that executes the notebook, then restarting that kernel.
Install Jupyter in the same virtual environment, and start it from there:
python -m pip install qiskit jupyter
jupyter notebookWhen a notebook is already open, install from a cell with the kernel’s own pip:
%pip install qiskit%pip targets the kernel. The shell form !pip install qiskit can call a pip from outside that kernel, so the cell reports success and the next cell still cannot import Qiskit. After %pip finishes, restart the kernel, then run:
import qiskit
print(qiskit.__version__)Jupyter launched from Anaconda Navigator often uses the base environment. Select the environment where you installed Qiskit before you open the notebook, or start jupyter notebook from the activated virtual environment.
If Jupyter is already installed in one Python and Qiskit is in another, register the Qiskit environment as a kernel:
python -m pip install ipykernel
python -m ipykernel install --user --name qiskit --display-name "Python (qiskit)"Choose Python (qiskit) in the notebook kernel menu. The import then uses the environment that received pip install qiskit.
When pip install qiskit fails
A pip install qiskit error means the installer rejected this Python, or it wrote the package where your later import does not look.
Match the first line of the error to one of the cases below.
No matching distribution found for qiskit
This message means PyPI has no Qiskit build for the Python that just ran pip.
Qiskit 2.x publishes wheels for Python 3.10 and newer, on 64-bit platforms. Python 3.9 and older, and 32-bit interpreters, produce No matching distribution found for qiskit. Run python --version. Install a current 64-bit Python from python.org, delete .venv, and create it with the new interpreter. On Windows the launcher can target a version directly:
py -3.12 -m venv .venvUse whichever 3.10+ version you installed. py -0p lists the interpreters that launcher can see.
externally-managed-environment
This message means the python on your PATH belongs to the operating system, and pip is refusing to modify it.
Debian, Ubuntu, and some Homebrew Pythons raise externally-managed-environment. Create the virtual environment in the previous section and run python -m pip install qiskit after you activate it. The operating-system Python stays as it is.
Failed building wheel
This message means pip found no prebuilt wheel and started compiling a dependency on your machine.
Qiskit ships wheels for 64-bit Windows, Apple silicon and 64-bit Intel Macs, and common 64-bit Linux builds. A line like Failed building wheel for some-package usually names a dependency, or a very new Python for which wheels are not up yet. Note the package name in that line, delete the venv, and recreate it with Python 3.12 or 3.13. A C compiler is the fallback for a platform outside those wheels.
qiskit-aer is separate, and current Aer releases require Python 3.11 or newer. If the command that failed was pip install qiskit qiskit-aer under Python 3.10, install the SDK on its own, or move the environment to Python 3.11 or newer. Nothing in the following lessons imports Aer.
ModuleNotFoundError: No module named ‘qiskit’
This message means the program now running is a different Python from the one that received the install.
Print both interpreters.
In the terminal that ran pip:
python -c "import sys; print(sys.executable)"In the notebook:
import sys
print(sys.executable)The two paths have to match. When they do not, either point the notebook at the Python (qiskit) kernel, or rerun python -m pip install qiskit using the sys.executable the notebook printed.
Permission errors, and a pip the shell cannot find
These messages mean the shell never reached a pip that can write into a user environment.
On Windows, a python command that opens the Microsoft Store is the store alias, not an installed interpreter. Install Python from python.org, and turn off the App execution aliases for python.exe and python3.exe. If PowerShell refuses .venv\Scripts\Activate.ps1 because scripts are disabled, activate from Command Prompt with .venv\Scripts\activate instead. An access-denied error inside a system directory is the same situation as an externally managed environment: install into .venv.
Check the install
A finished Qiskit install prints a version and can construct a circuit:
import qiskit
from qiskit import QuantumCircuit
print(qiskit.__version__)
QuantumCircuit(1)Later upgrades are python -m pip install -U qiskit, again with the environment activated.