compile_source with open('greeter.sol', 'r') as f: src = f.read() compiled_sol = compile_source(src) contract_interface = compiled_sol['<stdin>:Greeter'] w3 = Web3(HTTPProvider('http://eth.xsika.cz:8545')) con = w3.eth.contract(abi=contract_interface['abi'], bytecode=contract_interface['bin']) tx_id = con.deploy()