Bitcoin Forum
May 29, 2024, 02:13:37 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / Re: python-bitcoinrpc: modulenotfounderror no module named 'bitcoinrpc' on: March 16, 2019, 03:59:28 AM
Is there a video tutorial on Youtube/elsewhere on how to make json-rpc calls from python, or to use this python-bitcoinrpc library? The instructions are very sparse on the github page and I'm keen to learn this. I'm sure many people are as keen as I am, but I can't find any such video.
2  Bitcoin / Bitcoin Technical Support / Re: python-bitcoinrpc: modulenotfounderror no module named 'bitcoinrpc' on: March 15, 2019, 11:58:54 AM
Thanksfor your reply! How/ where do I adjust the path, please? I installed the package directly using "pip3 install python-bitcoinrpc". And then I tried importing it from within my python script (I use spyder IDE). Sorry for the noob question but where should I be adjusting paths and what should the new path be, please?
3  Bitcoin / Bitcoin Technical Support / Re: python-bitcoinrpc: modulenotfounderror no module named 'bitcoinrpc' on: March 15, 2019, 10:28:54 AM
Thank you for your reply. Afraid I haven't tried with python 2.7. I'm new to python and have spent quite a lot of time making stuff with python 3 so I would like to avoid moving to python 2 now. Would you happen to know any other way in which I can make the json-rpc calls to bitcoind from python 3? Appreciate your help.
4  Bitcoin / Bitcoin Technical Support / python-bitcoinrpc: modulenotfounderror no module named 'bitcoinrpc' on: March 15, 2019, 09:03:55 AM
I'm running bitcoind/ bitcoind -regtest on Windows 10 and am already able to use bitcoin-cli -regtest along with json-rpc methods to perform basic operations and get balances etc. When I try to do this programmatically on python 3 using Jeff Garzik's python-bitcoinrpc package (https://github.com/jgarzik/python-bitcoinrpc) I get a modulenotfounderror. However, my pip3 freeze shows python-bitcoinlib==0.10.1 and also python-bitcoinrpc==1.0.

My code is below (18443 is the regtest port):
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException

rpc_connection = AuthServiceProxy("http://%s:%s@127.0.0.1:18443"%("myrpcuser", "myrpcpassword"))
best_block_hash = rpc_connection.getbestblockhash()
print(rpc_connection.getblock(best_block_hash))

What am I doing wrong?
5  Local / Marketplace (India) / Re: I want to buy BTC with INR on: October 24, 2018, 12:50:37 PM
PM me
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!