Installing Motoko for Mac

Hi,
I am new to using the Internet Computer and I am trying to figure out how to install Motoko on my computer which is a macOS Big Sur laptop. I understand that before you install the SDK, you need to first satisfy the following criteria:

  • You have an internet connection and access to a shell terminal on your local macOS or Linux computer.Currently, the SDK only runs on computers with a macOS or Linux operating system.
  • You have node.js installed if you want to access the default frontend for the default project.
  • You have ICP tokens or cycles available for you to use.

The only criteria from this list that I do not seem to satisfy is having ICP tokens or cycles available to use. How are you supposed to get ICP tokens or cycles and do you have to pay anything to get them?

You can get free cycles from the faucet. Barring that, you would buy ICP on a token exchange such as Coinbase or Binance; 10T cycles is a good starting point and 1T cycles costs 1 XDR (~$1.30 as of writing) worth of ICP. (You don’t need to worry about crypto exchange rates - the cost is not in ICP but in XDR’s worth of ICP.)

However, you only need cycles to deploy; you can do local development without buying anything.

Thanks for your reply. I followed your instructions for trying to get the free cycles on faucet. I was able to get through the Authorization and SDK Setup steps, however I wasn’t able to get through the Create canister & Claim Cycles step. I received the following error message in mac terminal:

"Error when trying to forward to project dfx: Failed to get path to binary ‘dfx’ for version ‘0.9.3’.

Caused by:
0: Failed to install binary cache for version ‘0.9.3’.

    1: Unknown version '0.9.3' "

I installed dfx on my computer and it is version 0.10.1. What exactly should I do from here on?

There’s bad instructions in the claim cycles page. Fixing it.

The instructions in step 2 should say: mkdir my_project && cd my_project, then run echo '{}' > dfx.json. Running echo '{ "dfx": "0.9.3" }' > dfx.json instead will make dfx think that the project was created with that version. Therefore, dfx will try to run version 0.9.3 for everything in that project. You only have 0.10.1 installed, and it runs into an error. I recommend you simply tell dfx to not use the older version anymore: replace the content of dfx.json with nothing but {}.

1 Like

Thanks for your reply and help. I am trying to start over with all the instructions for attaining the free cycles on faucet, however I am now getting the following error message on the Authorization step:

Your Twitter account cannot have been used to claim free cycles before, and must be at least 90 days old to qualify for the free cycles.

Another thing I forgot to mention was that I am trying to install the SDK for Network deployment, not Local deployment.

That’s just a restriction to avoid people from spamming accounts.

The tool stays the same, no matter the network. The commands you run do change a little, mostly by using --network to configure which network you’re talking to.