C:\windows\system32>pip install pyadCollecting pyad Using cached pyad-0.5.16.tar.gzRequirement already satisfIEd (use --upgrade to upgrade): setuptools in c:\@R_404_4729@5\lib\site-packages (from pyad)Requirement already satisfIEd (use --upgrade to upgrade): pywin32 in c:\@R_404_4729@5\lib\site-packages (from pyad)Installing collected packages: pyad Running setup.py install for pyad ... doneSuccessfully installed pyad-0.5.16
但是当我尝试使用它时,我收到一个错误,抱怨没有找到adbase:
C:\windows\system32>pythonPython 3.5.1 (v3.5.1:37a07cee5969,Dec 6 2015,01:54:25) [MSC v.1900 64 bit (AMD64)] on win32Type "help","copyright","credits" or "license" for more information.>>> from pyad import aduserTraceback (most recent call last): file "<stdin>",line 1,in <module> file "C:\@R_404_4729@5\lib\site-packages\pyad\__init__.py",in <module> from adbase import set_defaults as pyad_setdefaultsimportError: No module named 'adbase'>>> import pyadTraceback (most recent call last): file "<stdin>",in <module> from adbase import set_defaults as pyad_setdefaultsimportError: No module named 'adbase'
这很奇怪,因为如果我尝试卸载pyad或者如果我检查site-packages目录,那么adbase肯定存在:
C:\windows\system32>pip uninstall pyadUninstalling pyad-0.5.16: c:\@R_404_4729@5\lib\site-packages\pyad-0.5.16-py3.5.egg-info c:\@R_404_4729@5\lib\site-packages\pyad\__init__.py c:\@R_404_4729@5\lib\site-packages\pyad\__pycache__\__init__.cpython-35.pyc c:\@R_404_4729@5\lib\site-packages\pyad\__pycache__\adcomputer.cpython-35.pyc c:\@R_404_4729@5\lib\site-packages\pyad\__pycache__\addomain.cpython-35.pyc c:\@R_404_4729@5\lib\site-packages\pyad\__pycache__\adgroup.cpython-35.pyc c:\@R_404_4729@5\lib\site-packages\pyad\__pycache__\adquery.cpython-35.pyc c:\@R_404_4729@5\lib\site-packages\pyad\__pycache__\adsearch.cpython-35.pyc c:\@R_404_4729@5\lib\site-packages\pyad\__pycache__\pyad.cpython-35.pyc c:\@R_404_4729@5\lib\site-packages\pyad\adbase.py c:\@R_404_4729@5\lib\site-packages\pyad\adcomputer.py c:\@R_404_4729@5\lib\site-packages\pyad\adcontainer.py c:\@R_404_4729@5\lib\site-packages\pyad\addomain.py c:\@R_404_4729@5\lib\site-packages\pyad\adgroup.py c:\@R_404_4729@5\lib\site-packages\pyad\adobject.py c:\@R_404_4729@5\lib\site-packages\pyad\adquery.py c:\@R_404_4729@5\lib\site-packages\pyad\adsearch.py c:\@R_404_4729@5\lib\site-packages\pyad\aduser.py c:\@R_404_4729@5\lib\site-packages\pyad\pyad.py c:\@R_404_4729@5\lib\site-packages\pyad\pyadconstants.py c:\@R_404_4729@5\lib\site-packages\pyad\pyadexceptions.py c:\@R_404_4729@5\lib\site-packages\pyad\pyadutils.pyProceed (y/n)?
pyad directory contents
我真的不确定还有什么可以尝试的.我在提升的命令提示符下运行所有内容,因此它不是权限问题.我甚至尝试下载pyad并使用setup.py安装它,但我遇到了同样的问题. adbase肯定存在,我无法弄清楚为什么Python没有找到它.
解决方法 这是pyad部分的一个错误.他们正在导入adbase,就好像它是一个独立的模块或包,这就是为什么它不起作用.解决此问题的正确方法是将导入更改为从pyad.adbase导入的绝对导入…或从.adbase导入的相对导入….但是,如果你检查Github上的master
分支,你会看到他们已经实际修复了它.但这不是全部,如果你检查他们的setup.py
,你会看到Github上的版本是0.5.15,而PyPI上的最后一个版本,你已经安装的版本是0.5.16.奇怪的.
我建议你直接从Github安装软件包,这应该解决这个问题.要做到这一点,首先卸载pyad,然后运行
pip install https://github.com/zakird/pyad/archive/master.zip总结
以上是内存溢出为你收集整理的python – pyad:安装得很好,但说无法找到adbase全部内容,希望文章能够帮你解决python – pyad:安装得很好,但说无法找到adbase所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)