익명 17:48

python - No module named 'bitcoin' on Ubuntu using WSL on Windows 10

python - No module named 'bitcoin' on Ubuntu using WSL on Windows 10

Which version of python should I use? When running pip3 install python-bitcoinlib I get 'Requirement already satisfied'. I run on Ubuntu using WSL in Windows 10. I have this error:

>>> from bitcoin.rpc import RawProxy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Rony\AppData\Local\Programs\Python\Python37\lib\site-packages\bitcoin\rpc.py", line 48, in <module>
    from bitcoin.wallet import CBitcoinAddress, CBitcoinSecret
  File "C:\Users\Rony\AppData\Local\Programs\Python\Python37\lib\site-packages\bitcoin\wallet.py", line 33, in <module>
    import bitcoin.core.key
  File "C:\Users\Rony\AppData\Local\Programs\Python\Python37\lib\site-packages\bitcoin\core\key.py", line 34, in <module
>
  _ssl = ctypes.cdll.LoadLibrary(ctypes.util.find_library('ssl') or 'libeay32')
  File "C:\Users\Rony\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 442, in LoadLibrary
    return self._dlltype(name)
  File "C:\Users\Rony\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found


Top Answer/Comment:

Check if its already listed in pip list

If yes, remove it using pip uninstall python-bitcoinlib

Then try pip3 install python-bitcoinlib

Also be careful with python packages, few might be malwares with similar names: https://arstechnica.com/gadgets/2021/07/malicious-pypi-packages-caught-stealing-developer-data-and-injecting-code/

상단 광고의 [X] 버튼을 누르면 내용이 보입니다