pybitcointools icon indicating copy to clipboard operation
pybitcointools copied to clipboard

After pip installing it, I can't import neither bitcoin, nor pybitcointools

Open sevandija opened this issue 7 years ago • 10 comments

Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information.

from pybitcointools import * Traceback (most recent call last): File "<pyshell#0>", line 1, in from pybitcointools import * File "C:\Users\Pig\Anaconda3\lib\site-packages\pybitcointools_init_.py", line 1, in from main import * ModuleNotFoundError: No module named 'main'

from bitcoin import * Traceback (most recent call last): File "<pyshell#1>", line 1, in from bitcoin import * ModuleNotFoundError: No module named 'bitcoin'

sevandija avatar Mar 24 '17 02:03 sevandija

Try to install using:

pip install git+https://github.com/vbuterin/pybitcointools

mtasic85 avatar Apr 14 '17 18:04 mtasic85

Worked for me with this:-

pip install bitcoin

kapilmar avatar Jun 28 '17 06:06 kapilmar

pip install bitcoin

Worked for me as well

anurag0126 avatar Jun 29 '17 17:06 anurag0126

It is end of life for pybitcointools as author has stated in last commit.

However, if you manually clone code from this commit: https://github.com/vbuterin/pybitcointools/tree/aeb0a2bbb8bbfe421432d776c649650eaeb882a5

You will be able to install version that was working before.

mtasic85 avatar Jan 21 '18 09:01 mtasic85

pip install bitcoin , worked for me ..!!!

MagentoExp avatar Jan 22 '18 11:01 MagentoExp

After I started getting the errors mentioned, I found I had to re-install Pybitcointools using pip, pointing it at the last commit hash before the repository was deleted:

pip install git+https://github.com/vbuterin/pybitcointools.git@aeb0a2bbb8bbfe421432d776c649650eaeb882a5

paulfioravanti avatar Feb 12 '18 11:02 paulfioravanti

I resolved my issues forking the project (into https://github.com/robermann/pybitcointools) and changing its module name: from 'bitcoin' to 'pybitcointools'.

If you want to give it a try: pip install git+https://github.com/robermann/pybitcointools

My pip freeze: bitcoin==1.1.42 pybitcointools==1.1.42 (installed as above) python-bitcoinlib==0.10.1

robermann avatar Aug 25 '18 13:08 robermann

i tried installing using methods here and the install succeeded, however when i try to run a simple example:

import pybitcointools
privkey = pybitcointools.random_key()

i get:

File "/Users/x/venv/lib/python3.6/site-packages/pybitcointools/init.py", line 1, in from main import * ModuleNotFoundError: No module named 'main'

squarewave24 avatar Aug 27 '18 11:08 squarewave24

I've run with success this whole script: https://github.com/robermann/bitcoinbook/blob/82b91869e73e13745da62fc1b79cb164104113b9/code/key-to-address-ecc-example.py

The init I have is: C:\apps\Python37-32\Lib\site-packages\pybitcointools\__init__.py

What OS do you have?

robermann avatar Aug 27 '18 13:08 robermann

simply

  • install bitcoin via pip as stated above
  • replace pybitcointools with bitcoin in your code …works for me.

vv01f avatar Nov 08 '18 09:11 vv01f