Dfx deploy failed to create canister

I have a wallet create using dfx.
I sent IC to it, I see it has a balance
I try to run dfx deploy --network ic and get an error “In order to create a canister on this network, you must use a wallet in order to allocate cycles to the new canister”
then it says to remove the “no-wallet” argument and try again, but I didn’t have the no-wallet argument.

I have a funded account - well I thought I did, I tried “dfx wallet balance --network ic” tells me “failed to setup wallet caller. no wallet configured for combination of identity icdev and network ic)”

dfx ledger balance --network=ic does show a balance

How do I deploy my canister from the dfx command line?

Dfx (intentionally) does not automatically use your ICP. You can set up a cycles wallet like described here. Once that is set up you can dfx deploy

Hi @Severin, this link is now broken, could you point me to the place where this part is now documented, please?

We no longer suggest using cycles wallets. dfx now defaults to keeping users’ cycles on the cycles ledger. Here one of the steps is converting ICP to cycles using dfx cycles convert.

dfx still allows you to use wallets. If you really want to go that route, the steps are:

> dfx ledger create-canister
# returns <canister_id>
> dfx identity deploy-wallet <canister_id>

# to top up the wallet some more:
> dfx ledger top-up <canister_id>