5

I installed pyethapp using pip install -c constraints.txt pyethapp. The constraints.txt file has one line, pyelliptic==1.5.7, to prevent the install error mentioned in this thread. The install succeeded, but when I run pyethapp I get the following error:

File "/home/ubuntu/pyethapp/pyeth-venv/bin/pyethapp", line 7, in <module>
  from pyethapp.app import app
File "/home/ubuntu/pyethapp/pyeth-venv/local/lib/python2.7/site-packages/pyethapp/app.py", line 2, in <module>
  from ethereum import blocks
ImportError: cannot import name blocks

I went looking for the blocks module in python2.7/site-packages/ethereum and found the file block.py. It appears as if the module was renamed, or that pyethapp was built for a different version of pyethereum.

The versions I'm installing (by default) are:

ethereum==2.0.4
pyethapp==1.5.0

Are these versions incompatible? Can I fix the error by installing different versions? Is there another way to fix the error (with modifying the source code)?

4

To get a working version in a virtualenv on Ubuntu 17 I first did (as per @audiomason suggestion above - I haven't tried without this step):

pip install ethereum==1.6.0 pyethapp==1.2.0

then (fixes this)

pip install pyelliptic==1.5.7

then (fixes this)

pip install tinyrpc[websocket]

It then works :-)

| improve this answer | |
0

This command will install a functional pyethapp:

pip install ethereum==1.6.0 pyethapp==1.2.0

| improve this answer | |
0

Better yet, install an up-to-date pyethapp from github, according to the instructions at https://github.com/ethereum/pyethapp/wiki/Getting-Started#installing-from-github -- to summarize, something like:

~/ethereum$ git clone https://github.com/ethereum/pyethapp
~/ethereum$ cd pyethapp
~/ethereum/pyethapp$ virtualenv .venv
~/ethereum/pyethapp$ source .venv/bin/activate
(.venv) ~/ethereum/pyethapp/$ # note the "(.venv)"
(.venv) ~/ethereum/pyethapp/$ pip install --editable .

But maybe use virtualenvwrapper's mkvirtualenv to make the virtual environment, and give it a better name, like this:

~/ethereum/pyethapp$ mkvirtualenv pyethapp
(pyethapp) ~/ethereum/pyethapp$
| improve this answer | |

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.