首页 > 解决方案 > 无法让 Python 3.8.3 识别比特币模块

问题描述

Traceback (most recent call last):
  File "/Users/nhkjdk/Documents/Tutorial.py", line 1, in <module>
    from bitcoin import *
ModuleNotFoundError: No module named 'bitcoin'
>>>

我有 Python 3.8.3——我已经从https://github.com/vbuterin/pybitcointools.git安装了 pip install cryptos

无法从加密货币导入...

不断收到此错误:

>>> from cryptos import *
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    from cryptos import *
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/cryptos/__init__.py", line 10, in <module>
    from .coins import *
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/cryptos/coins/__init__.py", line 1, in <module>
    from .bitcoin import *
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/cryptos/coins/bitcoin.py", line 1, in <module>
    from ..explorers import blockchain
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/cryptos/explorers/__init__.py", line 1, in <module>
    from . import base_insight, bitpay, blockdozer, dash_siampm, sochain
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/cryptos/explorers/base_insight.py", line 2, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

任何人有任何想法???谢谢。

标签: pythonpipbitcoin

解决方案


在终端尝试这条线。这将安装缺少的包“请求”。

python3 -m pip install requests --user

推荐阅读