adilmoujahid / blockchain-python-tutorial

Source Code for my blog post: A Practical Introduction to Blockchain with Python
Other
631 stars 413 forks source link

No module named parse #8

Open Cappuccinuo opened 6 years ago

Cappuccinuo commented 6 years ago

Situation: I want to start a blockchain node

Action: sudo python blockchain.py -p 5000

Result:

Traceback (most recent call last):
  File "blockchain.py", line 33, in <module>
    from urllib.parse import urlparse
ImportError: No module named parse

Attemption: pip install parse(install success, does not solve problem) pip install urllib(No matching distribution found for urllib) pip install urlparse(No matching distribution found for urlparse)

Solution: In blockchain.py, change from urllib.parse import urlparse to from urlparse import urlparse

Could you please tell me the reason why we cannot import urlparse from urllib.parse?

And I wonder if we can only execute all the command like create node, start the blockchain client under root? As it notify me "cannot import Crypto" when I type python blockchain_client.py without sudo.

Thanks.

Mauricem250 commented 5 years ago

from six.moves.urllib.parse import quote as urllib_quote ImportError: No module named parse

Does anyone know how to fix this?

CryptoRootz commented 5 years ago

yea im getting the same issue, this tutorial is bullshit bro.... waste of time

AyazSaiyed commented 5 years ago

from urlparse import urlparse

Have Fun ! #Solved