jgarzik / python-bitcoinrpc

Python interface to bitcoin's JSON-RPC API
GNU Lesser General Public License v2.1
642 stars 307 forks source link

Question/ Feature Request #13

Closed KonstantinSchubert closed 11 years ago

KonstantinSchubert commented 11 years ago

I am sorry, don't know where to ask this. Maybe it is an issue in terms of a missing entry in the readme:

How am I supposed to install this?

I downloaded the zip with wget, unpacked it and ran

sudo ./setup build sudo ./setup install

after changing the first line of the script to #!/usr/bin/python.

There is a bitcoinrpc file in my /usr/local/lib/python2.7/dist-packages/ now, but no jsonrpc. It is not surprising that I get the following error:

File "./bitcoinTest.py", line 2, in <module> from jsonrpc import ServiceProxy ImportError: No module named jsonrpc

So it seems jsonrpc is not getting installed? How can I install jsonrpc?

gandaro commented 11 years ago

The package is called "bitcoinrpc", not jsonrpc. This is what you want:

from bitcoinrpc.authproxy import AuthServiceProxy
KonstantinSchubert commented 11 years ago

But how come there is both a folder bitcoinrpc and jsonrpc in the repo? Is it that they are exchangeable?

gandaro commented 11 years ago

The jsonrpc folder is for compatibility with older versions of python-bitcoinrpc. 22e290b0bcabf6bc88b4d3f5a7d074677e8fe7b9 Or am I completely wrong?

KonstantinSchubert commented 11 years ago

I have no idea if you might be wrong, but it seems to me that jsonrpc is basically a copy of bitcionrpc with compatibiliy-preserving functionality.

Because yesterday, I sill managed to get my original code running after executing setup.py with bitcoinrpc changed to jsonrpc, thus installing a package called jsonrpc under /usr/bin/local/dist-packages/. So it seems that jsonrpc really is just an extended, compatibility-preserving version of bitcoinrpc?

That would also explain why setup.py only installs bitcoinrpc.

gandaro commented 11 years ago

We should be able to close this now.