bitcoin_tools
bitcoin_tools copied to clipboard
No module named 'bitcoin_tools.core'
Hello,
I am installing all the packages using pip command but still i am facing the below error.
Traceback (most recent call last):
File "C:\Users\GSK\AppData\Local\Programs\Python\Python37-32\mybit.py", line 1, in
How can i overcome this error. Please guide me.
Looks like you're trying to install the library using Python3, but the library is written in Python2.
You should use a Python2 interpreter.
The above issue is resolved but new issue raised, see the below description.
How to resolve this issue.
Traceback (most recent call last):
File "<pyshell#3>", line 1, in
Can you provide what file or script are you running so I can test this myself?
Installing packages pip install python_bitcoin_tools pip install bit See the below script which is provided in the website.
from bitcoin_tools.core.keys import generate_keys, store_keys from bitcoin_tools.wallet import generate_wif, generate_btc_addr
First of all the ECDSA keys are generated.
sk, pk = generate_keys()
Then, the Bitcoin address is derived from the public key created above.
btc_addr = generate_btc_addr(pk)
Both the public and private key are stored in disk in pem format. The Bitcoin address is used as an identifier in the
name of the folder that contains both keys.
store_keys(sk.to_pem(), pk.to_pem(), btc_addr)
Finally, the private key is encoded as WIF and also stored in disk, ready to be imported in a wallet.
generate_wif(btc_addr, sk)
And error:
Traceback (most recent call last):
File "C:\Python27\FirstBtc.py", line 1, in
i am using python2.
Oh OK, I see.
Looks like you have not properly installed the library. You need to follow the installing instructions under INSTALL.md, otherwise python cannot find the library.