How to install goal

I am not able execute teal file…

stdout, stderr = execute([“goal”, “clerk”, “compile”, “-o”, lsig_fname,

above line showing “no such file or directory goal”

how to install goal??

To install goal, follow Install a Node - Algorand Developer Portal
If you’re on Windows, see How to connect ASA with purestake API? - #9 by fabrice

Note that you can compile TEAL using the API instead of goal too: Using the SDKs - Algorand Developer Portal (search “compile”).

1 Like

We created node using sandbox in mac,
for windows we are using purestake API

from pyteal import *

import uuid,base64

import time

from algosdk import algod, transaction, account, mnemonic

from periodic import periodic_pay_escrow

#--------- compile & send transaction using Goal and Python SDK ----------

teal_source = periodic_pay_escrow.__teal__()


# compile teal

teal_file = str(uuid.uuid4()) + ".teal"


listToStr = ' '.join([str(elem) for elem in teal_source])

with open(teal_file, "w+") as f:

    #for item in teal_source:


lsig_fname = str(uuid.uuid4()) + ".tealc"

#with open(lsig_fname, "w+") as f:

    #for item in teal_source:

#        f.write(listToStr)



stdout, stderr = execute(["goal", "clerk", "compile", "-o",lsig_fname,


if stderr != "":


   # raise

elif len(stdout) < 59:

    print("error in compile teal")

   # raise

with open(lsig_fname, "rb") as f:

    teal_bytes =

lsig = transaction.LogicSig(teal_bytes)

# create algod clients

algod_token = 'eBlXRdLQNW6nbPb6grYp05BXsq0UHIz47nFik7sS'

algod_address = ''

purestake_token = {'X-Api-key': algod_token}

acl = algod.AlgodClient(algod_token, algod_address, headers=purestake_token)

periodic_pay_escrow function we imported…

still we getting error in executing teal file…

We create algo client using purestake api…