1

I am struggling to set up pyethereum on an old ThinkPad T500 running Ubuntu 16.04 and Python 2.7.11+, following installation instructions here and here.

When I test the installation with:

pyethereum/ethereum/tests$ pytest -m test_contracts.py

I get, for example:

going into /home/pavel/Ethereum/pyethereum/ethereum/tests
============================  test_db.py  ============================

===========================  test_abi.py  ============================ 
unhandled exception occurred while testing test_abi Traceback (most
recent call last):   File
"/usr/lib/python2.7/dist-packages/logilab/common/pytest.py", line 447,
in testfile
    options=self.options, outstream=sys.stderr)   File "/usr/lib/python2.7/dist-packages/logilab/common/pytest.py", line 763,
in __init__
    testLoader=NonStrictTestLoader())   File "/usr/lib/python2.7/unittest/main.py", line 77, in __init__
    self.module = __import__(module)   File "test_abi.py", line 3, in <module>
    import ethereum.testutils as testutils   File "/home/pavel/.local/lib/python2.7/site-packages/ethereum-1.3.6-py2.7.egg/ethereum/testutils.py",
line 14, in <module>
    from ethereum import state_transition ImportError: cannot import name state_transition

There are at least ten other tests that fail, all with same message:

 ImportError: cannot import name state_transition

I am eager to get started with pyethereum, and would be very grateful for any and all help. Thank you very much!

1

My first problem was that I was running an older version of Serpent (v 1.6.7), that still suffered from the bug described here. My second problem was due to a typo in the Serpent tutorial here: to test the installations, the command is

python -m pytest test_contracts.py

(in the Serpent tutorial, the "-m" was after "pytest", not before it).

I updated my Serpent via

sudo pip install --upgrade ethereum-serpent

and now all tests complete successfully.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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