Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 7 #283

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
50 changes: 27 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,34 @@ Repository for the book to be published by O'Reilly.

This book will be licensed under [CC-BY-NC-ND](https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode) once the book is published.


##Setting Up


To get the most out of this book, you’ll want to create an environment where you can run the example code and do the exercises. Here are the steps required to set everything up:

###1. Install Python 3.5 or higher on your machine:

Windows:
Windows:
[https://www.python.org/ftp/python/3.6.2/python-3.6.2-amd64.exe
](https://www.python.org/ftp/python/3.6.2/python-3.6.2-amd64.exe
)
](https://www.python.org/ftp/python/3.6.2/python-3.6.2-amd64.exe)

macOS:
macOS:
[https://www.python.org/ftp/python/3.6.2/python-3.6.2-macosx10.6.pkg](https://www.python.org/ftp/python/3.6.2/python-3.6.2-macosx10.6.pkg)

Linux
Linux
#####See your distro docs (many Linux distributions, like Ubuntu, come with Python 3.5+ preinstalled)

###2. Install pip by downloading this script: [https://bootstrap.pypa.io/get-pip.py](https://bootstrap.pypa.io/get-pip.py).

###3. Run this script using Python 3:

`$ python3 get-pip.py`
`$ python3 get-pip.py`

###4. Install Git. The commands for downloading and installing it are at [https://git-scm.com/downloads](https://git-scm.com/downloads).

###5. Download the source code for this book:

`$ git clone https://github.com/jimmysong/programmingbitcoin`
`$ git clone https://github.com/jimmysong/programmingbitcoin`
`$ cd programmingbitcoin`

###6. Install virtualenv:

`$ pip install virtualenv`
Expand All @@ -50,33 +46,41 @@ Linux

Linux/macOS

`$ virtualenv -p python3 .venv`
`$ virtualenv -p python3 .venv`
`$ . .venv/bin/activate`
`(.venv) $ pip install -r requirements.txt`

Windows

`C:\programmingbitcoin> virtualenv -p`
`C:\PathToYourPythonInstallation\Python.exe .venv`
`C:\programmingbitcoin> .venv\Scripts\activate.bat`
`C:\programmingbitcoin> pip install -r requirements.txt`
`C:\programmingbitcoin> virtualenv -p`
`C:\PathToYourPythonInstallation\Python.exe .venv`
`C:\programmingbitcoin> .venv\Scripts\activate.bat`
`C:\programmingbitcoin> pip install -r requirements.txt`
###8. Run Jupyter Notebook:

virtualenv -p python3 myenv
myenv\Scripts\activate
jupyter notebook

If Jupyter is not installed:

17 pip3 show jupyter
18 pip3 install jupyter

`(.venv) $ jupyter notebook`
`[I 11:13:23.061 NotebookApp] Serving notebooks from local directory:
/home/jimmy/programmingbitcoin`
`[I 11:13:23.061 NotebookApp] The Jupyter Notebook is running at:
`[I 11:13:23.061 NotebookApp] The Jupyter Notebook is running at:
[I 11:13:23.061 NotebookApp] http://localhost:8888/?token=
f849627e4d9d07d2158e3fcde93590eff4a9a7a01f65a8e7`
`[I 11:13:23.061 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).`
`[C 11:13:23.065 NotebookApp]`
`Copy/paste this URL into your browser when you connect for`
`the first time, to login with a token:`
`http://localhost:8888/?token=f849627e4d9d07d2158e3fcde93590eff4a9a7a01f65a8e7`

`[I 11:13:23.061 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).`
`[C 11:13:23.065 NotebookApp]`
`Copy/paste this URL into your browser when you connect for`
`the first time, to login with a token:`
`http://localhost:8888/?token=f849627e4d9d07d2158e3fcde93590eff4a9a7a01f65a8e7`

You should have a browser open up automatically, as shown in [Figure P-1](https://raw.githubusercontent.com/jimmysong/programmingbitcoin/master/images/prbc_0001.png).

![](https://raw.githubusercontent.com/jimmysong/programmingbitcoin/master/images/prbc_0001.png)

MORE INFO AT: [https://learning.oreilly.com/library/view/programming-bitcoin/9781492031482/preface01.html#setting_up](https://learning.oreilly.com/library/view/programming-bitcoin/9781492031482/preface01.html#setting_up)
MORE INFO AT: [https://learning.oreilly.com/library/view/programming-bitcoin/9781492031482/preface01.html#setting_up](https://learning.oreilly.com/library/view/programming-bitcoin/9781492031482/preface01.html#setting_up)
Loading