Skip to content

Installation

TIP

Before installing SmartPy you can try out the online IDE.

SmartPy can be installed via pip.

shell
pip install smartpy-tezos

Both Linux and macOS are supported. On Intel Macs Docker is required.

Details

It is recommended to use a virtualenv:

shell
python -m venv smartpy-env

which should be activated before installation of SmartPy:

shell
source smartpy-env/bin/activate

now install smartpy-tezos into the virtualenv with pip:

shell
pip install smartpy-tezos

For alpha releases, remember to explicitly set the version you want:

shell
pip install smartpy-tezos==<VERSION>

To test it, you can download an example and run it:

shell
wget https://releases.smartpy.io/0.24.0a1/templates/welcome.py
python welcome.py

You should now see a new welcome/ directory with test results and compiled contracts:

shell
$ ls Welcome/
log.txt                        step_003_cont_0_params.py    step_006_cont_0_params.json  step_008_cont_0_params.tz
step_002_cont_0_contract.json  step_003_cont_0_params.tz    step_006_cont_0_params.py    step_010_cont_1_contract.json
step_002_cont_0_contract.tz    step_004_cont_0_params.json  step_006_cont_0_params.tz    step_010_cont_1_contract.tz
step_002_cont_0_storage.json   step_004_cont_0_params.py    step_007_cont_0_params.json  step_010_cont_1_storage.json
step_002_cont_0_storage.py     step_004_cont_0_params.tz    step_007_cont_0_params.py    step_010_cont_1_storage.py
step_002_cont_0_storage.tz     step_005_cont_0_params.json  step_007_cont_0_params.tz    step_010_cont_1_storage.tz
step_002_cont_0_types.py       step_005_cont_0_params.py    step_008_cont_0_params.json  step_010_cont_1_types.py
step_003_cont_0_params.json    step_005_cont_0_params.tz    step_008_cont_0_params.py