Setting up your Windows PC for Blockchain Development

Peter M. Ogwara
Coinmonks
4 min readMay 18, 2023

--

As a blockchain developer or auditor, there are many compilers, software, libraries and frameworks you should have installed on your computer. These can be hard to remember if it has been a while since you did the installation and you have to move to another PC. Also, if you’re starting out, a quick list of the most important ones you need might be helpful.

So, here it is! A quick list of all the installations you’ll have to do to begin blockchain engineering on a Windows OS, and how to get them done. This list follows Patrick Collins’ amazing FreeCodeCamp tutorial on Python and Solidity, so we’ll be focusing on those two languages. If I ever get to JavScript and Vyper, I’ll do a separate list for that too.

Now, Let’s go!

1. Windows OS

Okay, this is a little tongue-in-cheek. Trying for a little humor. Of course you already have this installed. Right? Right??

2. Metamask

You will need a cryptocurrency wallet and ERC-compatible accounts to connect your smart contracts to public blockchains. Metamask is the most recommended for this because it offers good security, adequate compatibility, and is easily accessible as a browser add-on. Get it from https://metamask.io

3. VS Code

In order to write code, you need a good text editor. While you can use any text editor of your choice, VSCode is one of the most recommended because of its many features, unique extensions, and ability to call the command line from within. Get it from code.visualstudiocode.com.

4. Python

Download and install the Python compiler from www.python.org. Take note of the version. Latest versions usually come with some unresolved bugs and any issues you face will be resolved based on the version.

Once that’s done, go into your VSCode, click on extensions and search for Python. Install the Python and Pylance extensions by Microsoft, so you can compile your code directly from within your text editor.

5. Black (formatter)

This is not so critical, but it is recommended by Patrick Collins and will make your codes look a lot nicer and cleaner. Black is a code formatter that works nicely on Python, so, do get it, and integrate it into your text editor. Run the line below in your shell/command line:

pip install black

You can also get another formatter such as ‘Prettier’ which is great for Javascript and Solidity.

6. Solidity

The Solidity support for programming using VSCode can be gotten from within VSCode as an extension. Search for Solidity and install the extension by Juan Blanco.

7. Py-Solc-x

Of course, you can’t actually program in Solidity without Solidity compilers. These can be installed using Python’s built-in ‘pip’ library, in the same way as Black above, by running the following command in the command line:

pip install py-solc-x

8. Ganache

This fantastic program enables us to build on a blockchain entirely located on our local machine. Can be downloaded from www.trufflesuite.com/ganache

9. Web3.py

Web3.py is a collection of libraries that enables us to deploy and interact with blockchains and smart contracts using the Python language. Use the command below in your local machine’s shell:

pip install web3

10. DotEnv

DotEnv is a very valuable library that gives Python (and later Brownie) the ability to retrieve values directly from our system’s environment variables or local .env file. This is very useful for security as blockchain programming generally involves the use of sensitive information such as private keys, Infura Project IDs, and Etherscan tokens. Run the following command in your local machine shell.

pip install python-dotenv

11. NodeJS

While it seems strange that we need NodeJS when we are programming in Python, we actually only need it in order to take advantage of node package manager (npm) in downloading Yarn. Get it from

12. Yarn

Yarn is also a package manager with which we can get specialized libraries. While it works with npm, we need it to get the next library, the Ganache CLi. Get Yarn using the shell command below:

npm install --global yarn

13. Ganache Command Line

While Ganache UI is great, it’s easier to work directly from the command line while engaging in Blockchain development. This is the strength of tools like Brownie, and is made possible by Ganache Command Line library, or Ganache CLi. This works in exactly the same way as the UI (which it connects to), except it can be started and interacted with directly from the command line.

Run the command below to get it:

yarn global add ganache-cli

If this runs into any problems, forget Yarn and use npm directly:

npm install -g ganache

14. PipX

The entire purpose of pipx is to install Brownie in a method that makes it not only accessible from the command line but importable into Python scripts. Run the commands below one after the other to get it:

python -m pip install --user pipx
python -m pipx ensurepath

15. Brownie

Brownie makes the life of a smart contract developer much easier. With Brownie, a lot of the processes in developing and interacting with smart contracts are simplified, with more functions to work with.

pipx install eth-brownie

If your installation or use of Brownie runs into errors, check out my article on using Python 3.11 with Brownie here.

16. PyTest

PyTest is a library which gives us greater flexibility in conducting blockchain tests on our smart contracts.

pip install pytest

And that’s it! There are more libraries which could be useful, of course, but these are the most essential to your career as a blockchain engineer.

Good luck on your journey!

🌟 Feel free to ask questions! 🌟

Follow me for more Blockchain, Javascript, PHP, Python, or pure programming stories. 😁

Medium| Twitter | Github | Amazon

--

--

Peter M. Ogwara
Coinmonks

Academic Writer, Full-Stack Web Developer, Web3 Enthusiast