Registry / workflow / ipyparallel

ipyparallel

JSON →
library9.2.0pypypi✓ verified 84d ago

ipyparallel provides an architecture for interactive parallel and distributed computing within the IPython ecosystem, allowing users to interact with a cluster of Python kernels. It enables parallel execution of code, distributed data processing, and asynchronous task management. The current version is 9.1.0, and it generally follows a moderate release cadence, with major versions introducing significant features or compatibility changes.

pip install ipyparallel
INSTALL
IMPORT
SIG · IPYPARALLEL
I
ipyparallel
workflowpythonv9.2.0
Install
7.5s avg
Import
1934ms
Disk
115MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v9.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 2.019s · 129.2MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 7.5s · import 1.848s · 113MB
115MB installed
● package 115MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from ipyparallel import Client
from IPython.parallel import Client
Old import path from IPython itself; ipyparallel is now a separate library.
Cluster
from ipyparallel.cluster import Cluster
Programmatic cluster management, less common than the CLI 'ipcluster' for basic use.

This quickstart demonstrates how to connect to an existing ipyparallel cluster, obtain a direct view, and execute both synchronous and asynchronous parallel tasks. It assumes `ipcluster start` has been run in a separate terminal or managed process. If no cluster is running, the connection will fail.

import ipyparallel as ipp import time import os # NOTE: For this code to run, you must have an ipyparallel cluster running. # Start one from your terminal using: ipcluster start # (e.g., 'ipcluster start --n=4' for 4 engines) try: # Connect to the default cluster profile client = ipp.Client() if not client.ids: raise RuntimeError("No engines found in the cluster. Ensure 'ipcluster start' is running.") print(f"Connected to cluster with {len(client.ids)} engines.") # Get a direct view (all engines, tasks are mapped across them) dview = client[:] # Execute a simple parallel task synchronously def square(x): time.sleep(0.01) # Simulate some work return x * x print("Executing map_sync on range(10)...") results = dview.map_sync(square, range(10)) print(f"Parallel results (first 5): {results[:5]}...") # Execute an asynchronous task on each engine print("Executing async getpid()...") ar = dview.apply_async(lambda : os.getpid()) pids = ar.get() print(f"PIDs from engines: {pids}") except Exception as e: print(f"Could not connect to ipyparallel cluster or encountered an error: {e}") print("Please ensure 'ipcluster start' is running and no firewall is blocking access.")
ipyparallel --version
Debug
Known issues
breakingipyparallel 9.x requires Python 3.10 or newer. Older Python versions are not supported.
fix
Upgrade your Python environment to 3.10 or later, or use an older ipyparallel version (e.g., 8.x for Python 3.8-3.9).
affects: <9.0.0
gotchaConnections to the ipyparallel cluster can be blocked by firewalls or incorrect network configurations, especially when engines are on different machines.
fix
Ensure that the necessary ports (default 10100-10105 range, configurable) are open between the client and engine machines, or configure your profile to use SSH tunnels.
affects: all
gotchaThe Client must connect to the correct profile. If `ipcluster start` was run with `--profile=myprofile`, the client must specify `ipp.Client(profile='myprofile')`.
fix
Always ensure the client's profile matches the cluster's profile. Check `~/.ipython/profile_*/security` for connection files.
affects: all
gotchaUnderstanding the difference between `DirectView` (`client[:]`) and `LoadBalancedView` (`client.load_balanced_view()`) is crucial for correct task distribution and performance.
fix
`DirectView` assigns tasks round-robin (for `map`) or explicitly per-engine; `LoadBalancedView` sends tasks to the least busy engine. Choose the view appropriate for your workload.
affects: all
gotchaProperly managing the cluster lifecycle (`ipcluster start`/`stop`) is essential. Forgetting to stop clusters can leave orphan processes and consume resources.
fix
Always use `ipcluster stop` (or `client.shutdown()` programmatically) when you are finished with a cluster to clean up processes and free resources.
affects: all
Errors
Common errors & fixes
OSError: Connection file '~/.ipython/profile_default/security/ipcontroller-client.json' not found. You have attempted to connect to an IPython Cluster but no Controller could be found.
This error occurs because the ipyparallel client cannot find the connection file for a running IPython cluster, typically meaning the ipcluster controller has not been started or the client is looking in the wrong directory.
fix
Start the ipyparallel cluster using `ipcluster start` in your terminal before attempting to create an `ipyparallel.Client()` instance in your Python code. If the cluster is on a remote machine, ensure the connection file is copied to the client or its path is correctly specified.
ModuleNotFoundError: No module named 'ipyparallel' OR ipcluster: command not found
The ipyparallel package is either not installed in your current Python environment, or the `ipcluster` executable script is not in your system's PATH.
fix
Install ipyparallel using `pip install ipyparallel` or `conda install ipyparallel`. If `ipcluster` is still not found, ensure that the directory containing your Python environment's scripts (e.g., `~/.local/bin` or a virtual environment's `bin`/`Scripts` folder) is included in your system's PATH.
AttributeError: module 'ipyparallel' has no attribute 'Cluster'
This error indicates that you are using an older version of the ipyparallel library, as the `Cluster` API was introduced in version 7.0.
fix
Upgrade your ipyparallel package to version 7.0 or newer using `pip install --upgrade ipyparallel` or `conda update ipyparallel`.
ImportError: No module named 'some_module' (when running code on engines)
When running parallel tasks, a module imported on the client-side is not available in the Python environment of one or more ipyparallel engines.
fix
Ensure that 'some_module' is installed in the Python environment of all ipyparallel engines. For custom modules, you may need to manually distribute them to the engine machines or use `rc[:].push(dict(some_module=some_module))` if it's a small, self-contained module.
Upgrade
Version history
9.2.0latest on PyPI · released May 12, 2026
Audit
Dependencies
ipythonrequiredCore foundation for interactive Python and kernel management.
Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
ipyparallel — pip install ipyparallel · libregistry