Using this github library: blockchain.info python api
blockchain.py
from blockchain import Blockexplorer
block = blockexplorer.get_block('000000000000000016f9a2c3e0f4c1245ff24856a79c34806969f5084f410680')
When I run python blockchain.py in the command line on my mac I get this error:
Traceback (most recent call last):
  File "blockchain.py", line 1, in <module>
    from blockchain import Blockexplorer
  File "/Users/mbp13/blockchain.py", line 1, in <module>
    from blockchain import Blockexplorer
ImportError: cannot import name 'Blockexplorer'
I checked if the blockchain module is installed by pip freeze and i see blockchain ==1.4.0 in the list. So i assumed it's installed
What am I missing? Thanks
                        
I see 2 (two) problems here:
You script is called
blockchain.pysofrom blockchain importtries to import from it instead of theblockchainpackage. Rename your script so it doesn't overshadow the package name.You try to import
Blockexplorerwhile the real module is lowercase. The correct import statement (after you rename your script) isfrom blockchain import blockexplorer