PythonBitcoinlib FileNotFoundError:找不到模块“libeay32”

2024-09-28 23:11:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我怀疑这是一个新问题,但我正在尝试使用IDLE Shell 3.9.1运行以下代码:

from bitcoin.rpc import RawProxy
p = RawProxy()
info = p.getblockchaininfo()
print(info['blocks'])

我得到了以下错误:

Traceback (most recent call last):
  File "C:\Users\Zack\Documents\Python\Scripts\crypto1.py", line 1, in <module>
    from bitcoin.rpc import RawProxy
  File "C:\Users\Zack\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\bitcoin\rpc.py", line 48, in <module>
    from bitcoin.wallet import CBitcoinAddress, CBitcoinSecret
  File "C:\Users\Zack\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\bitcoin\wallet.py", line 33, in <module>
    import bitcoin.core.key
  File "C:\Users\Zack\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\bitcoin\core\key.py", line 34, in <module>
    _ssl = ctypes.cdll.LoadLibrary(ctypes.util.find_library('ssl') or 'libeay32')
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\ctypes\__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\ctypes\__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'libeay32' (or one of its dependencies). Try using the full path with constructor syntax.

有没有想过如何超越这一点?谢谢你的帮助


Tags: infrompyimportpackageslinerpcctypes