Python module bitcoinrpc not able to get installed

I want to run a small python3 script that needs to connect to bitcoin core via rpc. I am struggling to get the python-bitcoinrpc module to be installed successfully.

What I did:

  1. ssh to start9
  2. sudo /usr/lib/startos/scripts/chroot-and-upgrade
  3. apt install python3-full

what I get when running my script:
line 1, in
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
ModuleNotFoundError: No module named ‘bitcoinrpc’

After searching and searching, I have no glue, what to do to get the module to work.

Do you have any suggestion/help? Thank you!

Maybe the Devs can weigh in here but Your Python script might not be working because changes made directly on StartOS don’t persist after a restart. This means the python-bitcoinrpc module you installed gets removed every time the system reboots. To make these changes permanent, you need to integrate the installation and execution of your script into the StartOS service framework. That’s beyond my ability to instruct you but maybe someone will know

I’m not sure about the script / software you want to install, but for the persistence issue, you may want to look at: Custom DIY files and apt installs persisting through OS updates - #4 by SpiralCrunch

Thank you Rick, thank you Jesse,

I only want to run the script once. So no problem, if it is not persistend. Just need to get the rpc connection to my node working. I suppose, as long as there is no reboot or update, it should be able to connect to bitcoin core via rpc.
But the script runs into the errormessage, when trying to:
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
import datetime.

Are you aware of, and accounting for the fact that Bitcoin is being run in a docker container?

Now I am. Will do more research here. Thank you very much.

1 Like