2

Can anyone who's gotten the Ethereum utility libraries to work in JSFiddle or Python lend me a headstart?

All I want to do is validate some addresses by hand in a REPL environment (EIP-55 etc).

Tried pip install ethereum in my Python 3.6 environment but it fails with this error. Not sure why it's trying to invoke binaries from Visual Studio.

Next went to try in a Python 2.7 environment but mine must be buggered as I'm getting:

C:\Python27>python -m pip install ethereum
C:\Python27\python.exe: No module named pip

even after reinstalling python-2.7.14.amd64.msi to the C:\Python27 folder and ensuring pip is checkmarked (and ensuring my PYTHONHOME environment variable is correctly set of course).

Tried to figure out how to import the Ethereum libraries into repl.it (that would be ideal) but didn't manage it before moving on.

Was hoping to make a JSFiddle with something like:

<script src="https://rawgit.com/ethereumjs/ethereumjs-util/master/index.js"/>

but apparently the libraries need to be browserify'ed first.

I could keep kicking at this but I'm sure somebody out there must have already done it. All I'm looking for is a quick and dirty, friction-free way to get starting playing with the validate functions against some addresses I want to inspect.

2 Answers 2

1

Your Python3.6 install error is because the scrypt library is trying to build with linux headers. So, it looks like scrypt, and therefore the ethereum library, was not designed with Windows support.

The good news is that web3.py has address verification, and should be a straightforward install.

To get started:

C:\Python36\Scripts>pip install web3

C:\Python36\Scripts>python
>>> from web3 import Web3
>>> assert Web3.isChecksumAddress('0xFeC2079e80465cc8C687fFF9EE6386ca447aFec4')

Since you implied other potential utility needs, you may also be interested in web3's type conversions and sha3 hashing.

1

Just install Metamask, unlock it and in Chrome dev tools console you can access the injected web3 object:

enter image description here

1
  • 1
    Thanks super helpful! Sorry I could only pick one "right" answer.
    – rkagerer
    Commented Oct 6, 2017 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.