From: phobie <sfl...@sa...> - 2009-10-07 13:54:55
|
I am trying to use Python with python-ldap on a CIFS share. While Python works fine the import of ldap fails. Installed Active Python 2.6.2.2. Copied the Python dir to the share. Copied python26.dll pythoncom26.dll pywintypes26.dll to the new Python dir. Uninstalled the local Python! C:\> \\somehost\someshare\python2.6\python.exe ActivePython 2.6.2.2 (ActiveState Software Inc.) based on Python 2.6.2 (r262:71600, Apr 21 2009, 15:05:37) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path.insert(0,<path to setuptools>) >>> from setuptools.command.easy_install import main >>> main(['setuptools-0.6c9-py2.6.egg']) >>> main(['python_ldap-2.3.8-py2.6-win32.egg']) Everything installed fine but "import ldap" fails! C:\> \\somehost\someshare\python2.6\python.exe >>> import ldap Traceback (most recent call last): File "<stdin>", line 1, in <module> File "\\somehost\someshare\python2.6\lib\site-packages\python_ldap-2.3.8-py2.6-win32.egg\ldap\__init__ .py", line 22, in <module> from _ldap import * ImportError: DLL load failed: The specified module could not be found. >>> import sys >>> sys.path[2] '\\\\somehost\someshare\\python2.6\\lib\\site-packages\\python_ldap-2.3.8-py2.6-win32.egg' >>> import os >>> os.listdir(sys.path[2]) ['dsml.py', 'dsml.pyc', 'dsml.pyo', 'EGG-INFO', 'ldap', 'ldapurl.py', 'ldapurl.pyc', 'ldapurl.pyo', 'ldif.py', 'ldif.pyc ', 'ldif.pyo', '_ldap.py', '_ldap.pyc', '_ldap.pyd', '_ldap.pyo'] Actually it does not matter if the python2.6 dir is on a CIFS-share or on some other dir like D:\python2.6\. How to fix that Problem? Regards, Per |