bigchaindb / bigchaindb-driver

Official Python driver for BigchainDB
https://www.bigchaindb.com
Apache License 2.0
105 stars 104 forks source link

Missing common directory when using setup.py #415

Closed agwego closed 6 years ago

agwego commented 6 years ago

Description

Installing with python3 setup.py install, fails to include the common files, which causes the driver to fail when importing file in common.

What I Did

Added the following line to the MANIFEST.in file to make it work. recursive-include bigchaindb_driver/common * python3 setup.py install

ttmc commented 6 years ago

@agwego We just released a new version of the Python driver, 0.5.0a3

Maybe try installing and using that version instead. To install it:

pip install bigchaindb-driver==0.5.0a3

agwego commented 6 years ago

Yeah, that doesn't work for your information:

Traceback (most recent call last):
  File "createAccounts.py", line 8, in <module>
    from bigchaindb_driver import BigchainDB
  File "/usr/local/lib/python3.5/dist-packages/bigchaindb_driver/__init__.py", line 1, in <module>
    from .driver import BigchainDB   # noqa
  File "/usr/local/lib/python3.5/dist-packages/bigchaindb_driver/driver.py", line 2, in <module>
    from .offchain import prepare_transaction, fulfill_transaction
  File "/usr/local/lib/python3.5/dist-packages/bigchaindb_driver/offchain.py", line 8, in <module>
    from .common.transaction import (
ImportError: No module named 'bigchaindb_driver.common'

Same issue

You need to update the MANIFEST.in file

vrde commented 6 years ago

@agwego thanks for your issue. We recently added a new module to the driver and we didn't update setup.py property (side note: I assumed it was using find_packages). See #417 and #418. We will release 0.5.0a4 in a minute.

vrde commented 6 years ago

@agwego the new version has been uploaded, you can install it with pip install bigchaindb-driver==0.5.0a4.

agwego commented 6 years ago
root@u138:~# pip3 install bigchaindb-driver==0.5.0a4  
Traceback (most recent call last):
  File "/usr/local/bin/pip3", line 7, in <module>
    from pip._internal import main
ImportError: No module named 'pip._internal'
vrde commented 6 years ago

@agwego this is something that do not depend on us. From what I read, it seems like pip has not been installed correctly. Online I found that reinstalling pip should do the trick. Can you give it a try?

agwego commented 6 years ago

Yes that worked, thanks.

vrde commented 6 years ago

Thanks for the quick feedback! I'll close the issue now.