使用python从零搭建区块链1

前言

打算跟着这篇博客学习一下搭建区块链从零开始构建区块链(Blockchain),这一篇主要写一下搭建环境(忙乎了一上午),是按照博客里提到的那些配置的。

正文

这次开发我用的是vscode+anaconda2+python3.7,操作系统是windows10,并在虚拟环境中安装了flask和request。

 pip install Flask requests

本来想和博主一样用python2.7,就安装了anaconda2,谁成想2.7废弃了…本来还以为要重新下载anaconda3才能用python3.X,没想到我试了一下安装3.7居然成功了!
还需要安装curl,我查了一下相关资料,原来windows10上自带有curl(有的有),使用命令查看一下

curl -help

如果会弹出来许多相关信息,就是安装了。可以用一个example测试一下:

curl http://example.com/file

会得到

<!doctype html>
<html>
<head>
    <title>Example Domain</title>

    <meta charset="utf-8" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <style type="text/css">
    body {
      
      
        background-color: #f0f0f2;
        margin: 0;
        padding: 0;
        font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

    }
    div {
      
      
        width: 600px;
        margin: 5em auto;
        padding: 2em;
        background-color: #fdfdff;
        border-radius: 0.5em;
        box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);
    }
    a:link, a:visited {
      
      
        color: #38488f;
        text-decoration: none;
    }
    @media (max-width: 700px) {
      
      
        div {
      
      
            margin: 0 auto;
            width: auto;
        }
    }
    </style>
</head>

<body>
<div>
    <h1>Example Domain</h1>
    <p>This domain is for use in illustrative examples in documents. You may use this
    domain in literature without prior coordination or asking for permission.</p>
    <p><a href="https://www.iana.org/domains/example">More information...</a></p>
</div>
</body>
</html>

以上。

猜你喜欢

转载自blog.csdn.net/Bad_foxS/article/details/127652624