Skip to content

Commit 6fd9462

Browse files
Include x402 EVM extra so signer imports resolve in clean env
x402.mechanisms.evm.signers imports web3 at module load. Without the evm extra, `from x402.mechanisms.evm.signers import EthAccountSigner` raises ImportError in a fresh notebook environment. Switching to x402[httpx,evm] also makes the standalone eth-account pin redundant.
1 parent 05f9c09 commit 6fd9462

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

examples/agents_sdk/paying_apis_with_x402.ipynb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,10 @@
5858
"source": [
5959
"## Setup\n",
6060
"\n",
61-
"Install three packages:\n",
61+
"Install two packages:\n",
6262
"\n",
6363
"- [`openai-agents`](https://github.com/openai/openai-agents-python) — the Agents SDK\n",
64-
"- [`x402[httpx]`](https://pypi.org/project/x402/) — official Python client for the x402 protocol, with an `httpx`-based HTTP wrapper\n",
65-
"- [`eth-account`](https://eth-account.readthedocs.io/) — for constructing a Base signer from a private key"
64+
"- [`x402[httpx,evm]`](https://pypi.org/project/x402/) — official Python client for the x402 protocol. The `httpx` extra adds the `httpx`-based HTTP wrapper; the `evm` extra pulls in `eth-account` + `web3`, required by the Base signer."
6665
]
6766
},
6867
{
@@ -79,7 +78,7 @@
7978
},
8079
"outputs": [],
8180
"source": [
82-
"%pip install --quiet \"openai-agents>=0.17.0\" \"x402[httpx]>=2.10.0\" \"eth-account>=0.13.0\""
81+
"%pip install --quiet \"openai-agents>=0.17.0\" \"x402[httpx,evm]>=2.10.0\""
8382
]
8483
},
8584
{

0 commit comments

Comments
 (0)