在安装py-solc后,如果系统还没有安装solidity的话,会遇到以下的问题:
File "/home/ubuntu/.local/lib/python2.7/site-packages/solc/wrapper.py", line 155, in solc_wrapper
stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
所以需要在系统上安装solidity环境才可以运行
在ubuntu上安装solidity环境如下:
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install solc
在安装完solc之后,重新运行就没有问题
本文介绍了解决py-solc安装后因系统未安装Solidity而导致的问题的方法。通过在Ubuntu系统上安装Solidity环境,可以确保py-solc正常运行。
1663

被折叠的 条评论
为什么被折叠?



