Install the Aptos CLI on Windows
Last updated
Last updated
For Windows, the easiest way to install the Aptos CLI tool is via Python script. If that does not work, you can also install manually via pre-compiled binaries. The pre-compiled binaries approach is not generally recommended as updating is very manual.
python3 --version
If python3 is not installed, you can find installation instructions on .
⚠️
If you receive the error ModuleNotFoundError: No module named packaging
you can install packaging
by running pip3 install packaging
then repeat this step.
You should see instructions in your terminal saying “Execute the following command to update your PATH:“.
It should look something like setx PATH "%PATH%;C:\Users\<your_account_name>\.aptoscli\bin"
.
aptos help
.You should see a list of commands you can run using the CLI.
In the future, this is a helpful resource to learn exactly how each command works.
If you would like to update the Aptos CLI to the latest version via script, you can run aptos update
.
It will have a name like: aptos-cli-<version>-Windows-x86_64.zip
You will likely have to dismiss warnings that this is a suspicious file when downloading.
Move the file to whichever folder you would like to call aptos
from in the future.
Ex. C:\Users\<username>\Downloads\aptos-cli-3.1.0-Windows-x86_64\aptos.exe
.
You may want to add this path to your PATH environment variable to simplify calling the Aptos CLI going forward.
help
command.Use the path you copied earlier to call the Aptos CLI. Ex. C:\Users\<username>\Downloads\aptos-cli-3.1.0-Windows-x86_64\aptos.exe help
.
When installing with pre-compiled binaries, you can update the Aptos CLI by deleting your existing installation, then following the installation steps again.
⚠️
If neither of the above methods work, you will have to build the CLI from source by following these steps: