<p>Which version of python should I use?
When running <code>pip3 install python-bitcoinlib</code> I get 'Requirement already satisfied'.
I run on Ubuntu using WSL in Windows 10.
I have this error:</p>
<pre><code>&gt;&gt;&gt; from bitcoin.rpc import RawProxy
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;C:\Users\Rony\AppData\Local\Programs\Python\Python37\lib\site-packages\bitcoin\rpc.py&quot;, line 48, in &lt;module&gt;
    from bitcoin.wallet import CBitcoinAddress, CBitcoinSecret
  File &quot;C:\Users\Rony\AppData\Local\Programs\Python\Python37\lib\site-packages\bitcoin\wallet.py&quot;, line 33, in &lt;module&gt;
    import bitcoin.core.key
  File &quot;C:\Users\Rony\AppData\Local\Programs\Python\Python37\lib\site-packages\bitcoin\core\key.py&quot;, line 34, in &lt;module
&gt;
  _ssl = ctypes.cdll.LoadLibrary(ctypes.util.find_library('ssl') or 'libeay32')
  File &quot;C:\Users\Rony\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py&quot;, line 442, in LoadLibrary
    return self._dlltype(name)
  File &quot;C:\Users\Rony\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py&quot;, line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
</code></pre>

CC BY-SA 4.0
2021-10-04T05:24:50.850Z
What's the exact error it is printing when failing to import?
Mercedes
CC BY-SA 4.0
2021-10-04T13:26:21.813Z
@Mercedes >>> from bitcoin.rpc import RawProxy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'bitcoin'
Rony Tesler
CC BY-SA 4.0
2021-10-04T20:17:03.670Z
Are you sure you are using Python 3?
Mercedes
CC BY-SA 4.0
2021-10-04T20:19:10.490Z
`import sys; sys.version;`
Mercedes
CC BY-SA 4.0
2021-10-04T21:15:47.600Z
@Mercedes '3.8.10 (default, Jun  2 2021, 10:49:15) \n[GCC 9.4.0]'
Rony Tesler
CC BY-SA 4.0
2021-10-05T05:00:36.540Z
`import bitcoin; bitcoin.__version__;`, or find an equivalent one using bpython, don't use python but bpython to explore libraries you are not familiar with.
Mercedes
CC BY-SA 4.0
2021-10-05T05:03:07.623Z
Won't work because the bitcoin module isn't there. Your pip3 must belong in somewhere else. Is there any *conda in your system?
Mercedes
CC BY-SA 4.0
2021-10-05T05:11:43.600Z
`which pip3; which python`
Mercedes
CC BY-SA 4.0
2021-10-05T16:07:00.097Z
@Mercedes I made sure both are in the same place: which pip3.exe; which python.exe
/mnt/c/Users/Rony/AppData/Local/Programs/Python/Python37/Scripts/pip3.exe
/mnt/c/Users/Rony/AppData/Local/Programs/Python/Python37/python.exe
Rony Tesler
CC BY-SA 4.0
2021-10-05T16:07:59.917Z
@Mercedes I edited the post with the new error, it's too long for a comment.
Rony Tesler
CC BY-SA 4.0
2021-10-05T18:43:42.587Z
Try https://stackoverflow.com/a/8846029 (via https://github.com/weex/addrgen/issues/5)
Mercedes
CC BY-SA 4.0
2021-10-05T21:59:13.060Z
@Mercedes I need to install the C# openssl on my wsl ubuntu? If I just downloading those 2 files I get this error: _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 193] %1 is not a valid Win32 application
Rony Tesler
CC BY-SA 4.0
2021-10-06T13:55:19.727Z
@Mercedes I run on Ubuntu
Rony Tesler
<bitcoin-core><python><mastering-bitcoin><python-bitcoinlib>
python - No module named 'bitcoin' on Ubuntu using WSL on Windows 10
Rony Tesler
# python - No module named 'bitcoin' on Ubuntu using WSL on Windows 10

(Asked by: username_0 on 2021-10-04)

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\username_0\AppData\Local\Programs\Python\Python37\lib\site-packages\bitcoin\rpc.py", line 48, in <module>
    from bitcoin.wallet import CBitcoinAddress, CBitcoinSecret
  File "C:\Users\username_0\AppData\Local\Programs\Python\Python37\lib\site-packages\bitcoin\wallet.py", line 33, in <module>
    import bitcoin.core.key
  File "C:\Users\username_0\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\username_0\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 442, in LoadLibrary
    return self._dlltype(name)
  File "C:\Users\username_0\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

```

**Tags:** bitcoin-core, python, mastering-bitcoin, python-bitcoinlib

> **Comments:**
> **username_1**: What's the exact error it is printing when failing to import?  
> **username_0**: @username_1 >>> from bitcoin.rpc import RawProxy Traceback (most recent call last):   File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'bitcoin'  
> **username_1**: Are you sure you are using Python 3?  
> **username_1**: `import sys; sys.version;`  
> **username_0**: @username_1 '3.8.10 (default, Jun  2 2021, 10:49:15) \n[GCC 9.4.0]'  
> **username_1**: `import bitcoin; bitcoin.__version__;`, or find an equivalent one using bpython, don't use python but bpython to explore libraries you are not familiar with.  
> **username_1**: Won't work because the bitcoin module isn't there. Your pip3 must belong in somewhere else. Is there any *conda in your system?  
> **username_1**: `which pip3; which python`  
> **username_0**: @username_1 I made sure both are in the same place: which pip3.exe; which python.exe /mnt/c/Users/username_0/AppData/Local/Programs/Python/Python37/Scripts/pip3.exe /mnt/c/Users/username_0/AppData/Local/Programs/Python/Python37/python.exe  
> **username_0**: @username_1 I edited the post with the new error, it's too long for a comment.  
> **username_1**: Try https://stackoverflow.com/a/8846029 (via https://github.com/weex/addrgen/issues/5)  
> **username_0**: @username_1 I need to install the C# openssl on my wsl ubuntu? If I just downloading those 2 files I get this error: _ssl = ctypes.cdll.LoadLibrary(ctypes.util.find_library('ssl') or 'libeay32')   File "C:\Users\username_0\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 442, in LoadLibrary     return self._dlltype(name)   File "C:\Users\username_0\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 364, in __init__     self._handle = _dlopen(self._name, mode) OSError: [WinError 193] %1 is not a valid Win32 application  
> **username_0**: @username_1 I run on Ubuntu  

---

## 0 answers

