diff --git a/client/zeth/core/contracts.py b/client/zeth/core/contracts.py index 85201c57e..b1c4225af 100644 --- a/client/zeth/core/contracts.py +++ b/client/zeth/core/contracts.py @@ -117,7 +117,11 @@ def get_block_number(web3: Any) -> int: def install_sol() -> None: - solcx.install_solc(SOL_COMPILER_VERSION) + try: + solcx.install_solc(SOL_COMPILER_VERSION) + except solcx.exceptions.SolcInstallationError: + from solcx.install import compile_solc # type: ignore + compile_solc(SOL_COMPILER_VERSION) def compile_files(files: List[str], **kwargs: Any) -> Any: