"LookupError: Couldn't find path to unrar library" on Win10
<p>I have installed unrar library by using <code>pip install unrar</code>, which installed <code>unrar-0.3</code>.
After compiling my code using <code>unrar</code> library in <code>pydev-eclipse</code> I am getting the following error message:</p>

<pre><code>File "C:\Python27\lib\site-packages\unrar\unrarlib.py", line 57, in &lt;module&gt;
raise LookupError("Couldn't find path to unrar library.")
LookupError: Couldn't find path to unrar library.
</code></pre>

<p>I have looked over in <code>C:\Python27\lib\site-packages\unrar\unrarlib.py</code> and there its written:</p>

<pre><code>lib_path = os.environ.get('UNRAR_LIB_PATH', None)

# find and load unrar library
unrarlib = None
if platform.system() == 'Windows':
    from ctypes.wintypes import HANDLE as WIN_HANDLE
    HANDLE = WIN_HANDLE
    UNRARCALLBACK = ctypes.WINFUNCTYPE(ctypes.c_int, ctypes.c_uint,
                                       ctypes.c_long, ctypes.c_long,
                                       ctypes.c_long)
    lib_path = lib_path or find_library("unrar.dll")
    if lib_path:
        unrarlib = ctypes.WinDLL(lib_path)
else:
    # assume unix
</code></pre>

<p>I cannot find the <code>unrar.dll</code> anywhere. Whereas the installation is done correctly. I don't know how to fix it. On my previous computer(win7 platform), it was working without any errors.</p>

<p>You should download the UnRAR.dll Library from <a href="http://www.rarlab.com/rar/UnRARDLL.exe" rel="nofollow">http://www.rarlab.com/rar/UnRARDLL.exe</a> and extract it anywhere in your PATH</p>

<p>Edit: You should set the UNRAR_LIB_PATH environment variable with the location of unrar.dll</p>

<p>Edit2: As a last resort:</p>

<ol>
<li>extract <code>UnRARDLL.exe</code> into <code>C:\Program Files (x86)\UnrarDLL\</code></li>
<li>if you're using Python2.7 64bit, select <code>UnRAR64.dll</code> and <code>UnRAR64.lib</code> files from <code>C:\Program Files (x86)\UnrarDLL\x64</code> and rename them to <code>unrar.dll</code> and <code>unrar.lib</code></li>
<li>copy them in <code>C:\Windows\System32</code>.</li>
<li>if you're using a 32bit version of python, simply copy unrar.dll and unrar.lib from <code>C:\Program Files (x86)\UnrarDLL\</code> to <code>C:\Windows\System32</code></li>
</ol>

python eclipse python-2.7 rar unrar