首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Solidity的install_soc()函数需要永远完成它的运行

Solidity的install_soc()函数需要永远完成它的运行
EN

Stack Overflow用户
提问于 2021-09-20 01:36:13
回答 1查看 45关注 0票数 0
代码语言:javascript
复制
from solcx import compile_standard, install_solc

print("install start")

install_solc("v0.7.0")

print("install finish")

with open("./SimpleStorage.sol", "r") as file:
    simple_storage_file = file.read()
print(simple_storage_file)

print("finished downloading")
# Compile our solidity
compiled_sol = compile_standard(
    {
        "language": "Solidity",
        "sources": {"SimpleStorage.sol": {"content": simple_storage_file}},
        "settings": {
            "outputSelection": {
                "*": {"*": ["abi", "metadata", "evm.bytecode", "evm.sourceMap"]}
            },
        },
    },
    solc_version="0.7.0",
)

print("Here si the results")
print(compiled_sol)

由于某些原因,代码只是继续加载到install_solc("v0.7.0"),并且不会继续前进并打印以下行"install finish“。我通过conda安装py-solc-x,因为我在conda环境中运行python。python运行的是3.7.11

我试图理解为什么会发生这种无限的加载。如有任何帮助,我们不胜感激!

EN

回答 1

Stack Overflow用户

发布于 2021-11-27 17:21:26

这只发生在我第一次运行install_solc("0.6.0")的时候。我很不耐烦,一直退出,因为我认为出了问题,但如果你让它完成,它就永远不会再做了(至少对那个版本是这样)。大约花了五分钟(!)对我来说。

顺便说一句,我认为v0.7.0是不正确的--你不需要包含v

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69248293

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档