pyad: Installs fine, but says it can't find adbase
<p>This has me pretty confused. I've installed pyad using pip and everything seems fine:</p>

<pre><code>C:\WINDOWS\system32&gt;pip install pyad
Collecting pyad
  Using cached pyad-0.5.16.tar.gz
Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\python35\lib\site-packages (from pyad)
Requirement already satisfied (use --upgrade to upgrade): pywin32 in c:\python35\lib\site-packages (from pyad)
Installing collected packages: pyad
  Running setup.py install for pyad ... done
Successfully installed pyad-0.5.16
</code></pre>

<p>But when I try to use it, I get an error that complains about not finding adbase:</p>

<pre><code>C:\WINDOWS\system32&gt;python
Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; from pyad import aduser
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "C:\Python35\lib\site-packages\pyad\__init__.py", line 1, in &lt;module&gt;
    from adbase import set_defaults as pyad_setdefaults
ImportError: No module named 'adbase'
&gt;&gt;&gt; import pyad
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "C:\Python35\lib\site-packages\pyad\__init__.py", line 1, in &lt;module&gt;
    from adbase import set_defaults as pyad_setdefaults
ImportError: No module named 'adbase'
</code></pre>

<p>This is odd, because if I try to uninstall pyad or if I check the site-packages directory, adbase is definitely there:</p>

<pre><code>C:\WINDOWS\system32&gt;pip uninstall pyad
Uninstalling pyad-0.5.16:
  c:\python35\lib\site-packages\pyad-0.5.16-py3.5.egg-info
  c:\python35\lib\site-packages\pyad\__init__.py
  c:\python35\lib\site-packages\pyad\__pycache__\__init__.cpython-35.pyc
  c:\python35\lib\site-packages\pyad\__pycache__\adcomputer.cpython-35.pyc
  c:\python35\lib\site-packages\pyad\__pycache__\addomain.cpython-35.pyc
  c:\python35\lib\site-packages\pyad\__pycache__\adgroup.cpython-35.pyc
  c:\python35\lib\site-packages\pyad\__pycache__\adquery.cpython-35.pyc
  c:\python35\lib\site-packages\pyad\__pycache__\adsearch.cpython-35.pyc
  c:\python35\lib\site-packages\pyad\__pycache__\pyad.cpython-35.pyc
  c:\python35\lib\site-packages\pyad\adbase.py
  c:\python35\lib\site-packages\pyad\adcomputer.py
  c:\python35\lib\site-packages\pyad\adcontainer.py
  c:\python35\lib\site-packages\pyad\addomain.py
  c:\python35\lib\site-packages\pyad\adgroup.py
  c:\python35\lib\site-packages\pyad\adobject.py
  c:\python35\lib\site-packages\pyad\adquery.py
  c:\python35\lib\site-packages\pyad\adsearch.py
  c:\python35\lib\site-packages\pyad\aduser.py
  c:\python35\lib\site-packages\pyad\pyad.py
  c:\python35\lib\site-packages\pyad\pyadconstants.py
  c:\python35\lib\site-packages\pyad\pyadexceptions.py
  c:\python35\lib\site-packages\pyad\pyadutils.py
Proceed (y/n)?
</code></pre>

<p><a href="https://i.stack.imgur.com/y7Yg2.png" rel="nofollow">pyad directory contents</a></p>

<p>I'm really not sure what else to try. I've run everything under an elevated command prompt, so it's not a permissions issue. I even tried downloading pyad and installing it using setup.py, but I had the same problem with that. adbase is <em>definitely</em> there, and I can't figure out why Python isn't finding it.</p>

<p>That's a bug on pyad part. They're importing adbase as if it were a standalone module or package, and that's why it does not work. The proper way to fix this would be to change the import to an absolute import <code>from pyad.adbase import ...</code> or relative <code>from .adbase import ...</code>.</p>

<p>However, if you check the <a href="https://github.com/zakird/pyad/blob/master/pyad/__init__.py" rel="nofollow"><code>master</code></a> branch on Github, you will see that they have actually fixed it. But that's not all, if you check their <a href="https://github.com/zakird/pyad/blob/master/setup.py#L13" rel="nofollow"><code>setup.py</code></a> you'll see that the version on Github is <code>0.5.15</code>, while the last version on PyPI, which is the one you have installed, is <code>0.5.16</code>. Weird.</p>

<p>I suggest you to install the package directly from Github, and that should take care of the problem. To do that, first uninstall <code>pyad</code> and then run</p>

<pre><code>pip install https://github.com/zakird/pyad/archive/master.zip
</code></pre>

python pip