NumPy Installation
Use a separate virtual environment for local work, or open a supported example in the NumPy playground. Keep the interpreter and its installed packages together.
How it works
The local review uses Python 3.12.14 and NumPy 2.5.4. The existing browser tool uses Pyodide 0.27.7 with NumPy 2.0.2, so compatible examples are tested in both. In Windows CMD, create an environment with py -3.12 -m venv .venv and install using .venv\Scripts\python.exe -m pip install numpy==2.5.4. Run files with that same interpreter. The playground downloads its runtime only when you select Run.
Run the code
Select Try in playground to preload the complete code into the NumPy editor. Nothing executes on import; choose Run when ready. The first execution loads the local Pyodide runtime and NumPy package. Each ordinary run starts fresh, with no access to this page’s cookies or personal files. In-memory streams and temporary virtual files belong to the runtime, not your PC.
For local work, use a separate virtual environment and run python setup.py. Download the complete source. The reviewed local environment uses Python 3.12.14 and NumPy 2.5.4; the browser uses Pyodide 0.27.7 with NumPy 2.0.2. Compatible examples are checked in both. See the environment setup. No Apache or database server is required.
Example
import numpy as np
print(np.__version__.split(".")[0])
print(np.array([3, 4], dtype=np.int64).tolist())
Expected result
2 [3, 4]
The example checks the major version rather than pretending the local and browser patch versions are identical. Each complete download includes import numpy as np and runs independently with its own small fixture.
Use NumPy’s official reference for precise contracts, supported versions and numerical limitations.