I made an executable file from python scripts and cx_freeze. The freezing looks ok. But I have problmes when I use INNO to create a setup file. I can create the setup and successfully deploy the application. But while I launch it from "Program Files (x86)" directory I have a runtime error : Could not find the matplotlib data files
C:\Program Files (x86)\GLADDataExtraction>main
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
exec(code, m.__dict__)
File "main.py", line 8, in <module>
File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 947, in <module>
rcParams = rc_params()
File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 865, in rc_params
return rc_params_from_file(fname, fail_on_error)
File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 930, in rc_params_from_file
ret['datapath'] = get_data_path()
File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 312, in wrapper
ret = func(*args, **kwargs)
File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 655, in _get_data_path_cached
defaultParams['datapath'][0] = _get_data_path()
File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 651, in _get_data_path
raise RuntimeError('Could not find the matplotlib data files')
RuntimeError: Could not find the matplotlib data files
I looked for explanations on internet quite extensively without success. There are many topics linked to py2exe but none for cx_freeze.
I investigated my cx_freeze setup.py file, displayed below :
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Python 2.7
# 02/2011
import sys, os
from cx_Freeze import setup, Executable
import matplotlib
#############################################################################
# préparation des options
# chemins de recherche des modules
path='D:\\IceSat\\tests\\test_executable\\test_GLASDataExtraction'
if os.path.exists(path):
print "exist"
if path in sys.path:
print "OK"
else:
print "insert"
sys.path.append(path)
path = sys.path + ["package_interface", "package_traitement"]
##build_exe_options = { 'packages': ['scipy'],
## "include_files": [('C:\\Python27\\Lib\\site-packages\\scipy\\special\\_ufuncs.pyd','_ufuncs.pyd')]}
# options d'inclusion/exclusion des modules
##includes = ["sip", "matplotlib"]
includes = ["sip"]
##excludes = ["tk","tcl"]
excludes = []
##packages = ["scipy", "scipy.signal", "scipy.special", "matplotlib", "matplotlib.mpl-data"]
##packages = ["scipy", "scipy.signal", "scipy.special", "matplotlib", "matplotlib.backends"]
##packages = ["scipy", "scipy.signal", "scipy.special", "matplotlib"]
packages = ["scipy", "scipy.signal", "scipy.special"]
##packages = ["scipy", "scipy.signal", "scipy.special", "matplotlib", "matplotlib.backends", "matplotlib.mpl-data"]
### construction du dictionnaire des options
options = {"path": path,
"includes": includes,
"excludes": excludes,
"packages": packages,
## "include_files": includefiles,
"include_files":[(matplotlib.get_data_path(),"mpl-data")]
## "include_files":[(matplotlib.get_data_path(),"HDE")]
#### "include_files":[matplotlib.get_data_path(),"C:\\Python27\\Lib\site-packages\\matplotlib\\mpl-data"]
## "bin_path_includes": binpathincludes
}
# création du setup
setup(
name = "GLASDataExtraction",
version = "1",
description = "Extraction et analyse de data GLAS",
author = "Henri",
options = {"build_exe": options},
## executables = [cible_1]
executables=[Executable("main.py")]
)
There are many comments because I tried to simplify as possible the setup.py file without impact in build directory.
After launching
python setup.py build
in DOS window, directory 'build/exe... ' are created.
Inside there are :
library.zip file with many packages (matplotlib is inside but without mpl-data which doesn't looks like a package as there is no init.py file).
many .pyd files
4 directory : imageformats, mpl-data, tcl, tk. mpl-data is there with
its content.
Then, my setup file is created with INNO application in "Program Files (x86)" directory. I launch the installation with this setup file. It looks ok. My program directory is created with few directories and files. Files from "C:\Python27\Lib\site-packages\matplotlib\mpl-data" are among those files. But when I launch the .exe file, I have the error "RuntimeError: Could not find the matplotlib data files".
My configuration is :
WINDOWS 7 64 bits
python 2.7 64 bits
cx_freeze 4.3.3
inno 5.5.5
pyqt4
Thank you Thomas, yes I first run the frozen exe before make the installer. it was OK.
I found a solution: while importing directory, inno copies all the files in the same directory as the exe file (Program Files (x86) directory). But if I define the same directory as frozen exe, I have to add mpl-data in the path Dest dir. in iss INNO script:
the line in the script is :
\build\exe.win-amd64-2.7\mpl-data\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
I add mpl-data directory in the path in iss file, in order to have the same relative path from the exe to mpl-data file in the install directory and in frozen directory :
\build\exe.win-amd64-2.7\mpl-data\*"; DestDir: "{app}\mpl-data\"; Flags: ignoreversion recursesubdirs createallsubdirs
I compile, install... it works
Find and edit the hook-matplotlib.py inside of lib/site-packages/pyinstaller/hooks
edit the data section from: datas = [ (mpl_data_dir, "mpl-data"), ]
to
datas = [ (mpl_data_dir, "matplotlib/mpl-data"), ]
Related
My application uses a Glade file and also cached data in a JSON file. When I do the following, everything works okay as long as the user installs the application with ninja install
#Install cached JSON file
install_data(
join_paths('data', 'dataCache.json'),
install_dir: join_paths('myapp', 'resources')
)
#Install the user interface glade file
install_data(
join_paths('src', 'MainWindow.glade'),
install_dir: join_paths('myapp', 'resources')
)
The downside is that the user needs to install the application. I want the user to be able to just build the application with ninja and run it without installing it if they don't want to install it on their system. The problem is that when I do
#Copy the cached JSON file to the build output directory
configure_file(input : join_paths('data', 'dataCache.json'),
output : join_paths('myapp', 'resources', 'dataCache.json'),
copy: true
)
#Copy the Glade file to the build output directory
configure_file(input : join_paths('src', 'MainWindow.glade'),
output : join_paths('myapp', 'resources', 'MainWindow.glade'),
copy: true
)
I get ERROR: Output file name must not contain a subdirectory.
Is there a way to run ninja and have it create the directories myapp/resources on the build folder and then copy the Glade and JSON file there to be used as resources? Such as to let the user run the application without having to do ninja install?
You can do it by making a script and call it from Meson.
For example, in a file copy.py that takes the relative input and output paths as arguments:
#!/usr/bin/env python3
import os, sys, shutil
# get absolute input and output paths
input_path = os.path.join(
os.getenv('MESON_SOURCE_ROOT'),
os.getenv('MESON_SUBDIR'),
sys.argv[1])
output_path = os.path.join(
os.getenv('MESON_BUILD_ROOT'),
os.getenv('MESON_SUBDIR'),
sys.argv[2])
# make sure destination directory exists
os.makedirs(os.path.dirname(output_path), exist_ok=True)
# and finally copy the file
shutil.copyfile(input_path, output_path)
and then in your meson.build file:
copy = find_program('copy.py')
run_command(
copy,
join_paths('src', 'dataCache.json'),
join_paths('myapp', 'resources', 'dataCache.json')
)
run_command(
copy,
join_paths('src', 'MainWindow.glade'),
join_paths('myapp', 'resources', 'MainWindow.glade')
)
Tried everything possible to fix this bug am not sure where I'm going wrong. I've run pip already and seems like everything is in place, but the lib errors are still there.
Need guidance on what else to check
pip install --system --upgrade -r requirements.txt -t lib
$ cat appengine_config.py
import sys
import os
sys.path.insert(0, 'lib')
# appengine_config.py
from google.appengine.ext import vendor
# Add any libraries install in the "lib" folder.
vendor.add('lib')
$ cat requirements.txt
GoogleAppEngineCloudStorageClient==1.9.22.1
google-api-python-client
google-cloud
google-cloud-bigquery
#Inside the code
from google.cloud import bigquery
from google.cloud.bigquery import Dataset
ERROR 2018-11-10 16:24:47,981 wsgi.py:263]
Traceback (most recent call last):
File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "/home/royans/repository/tesmon/tesmonweb/tmon.py", line 32, in <module>
from google.cloud import bigquery
File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/runtime/sandbox.py", line 1149, in load_module
raise ImportError('No module named %s' % fullname)
ImportError: No module named google.cloud.bigquery
I'm becoming mad about installing robotframework on IronPython in a Windows machine. Please someone could take a look on this.
I have installed IronPython 2.7.7, added the path system variable for both main and Scripts folder, also I installed the elementtree-1.2.7-20070827-preview.zip as it looks that the library that comes with IronPython is "broken" (this info and instruction comes from IronPython site).
Then I run the
ipy -X:Frames -m ensurepip
to be able to use pip.
Everything should be ready now to get the robotframework installed by:
ipy -X:Frames -m pip install robotframework
The package starts getting downloaded until here:
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\setuptools\__init__.py", line 11, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\setuptools\extern\__init__.py", line 1, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\__init__.py", line 46, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\extern\__init__.py", line 42, in load_module
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\_vendor\six.py", line 701, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\_vendor\six.py", line 692, in exec_
AttributeError: 'module' object has no attribute '_getframe'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\***\appdata\local\temp\pip-build-vnlada\robotframework\
I tried another workaround just downloading the robotframework source, uncompressing and placing it in my program folders. From the RF folder I tried to run:
C:\Program Files (x86)\IronPython 2.7\ipy.exe" setup.py install
and again same error:
File "setup.py", line 11, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site- packages\setuptools\__init__.py", line 11, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\setuptools\extern\__init__.py", line 1, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\__init__.py", line 46, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\extern\__init__.py", line 42, in load_module
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\_vendor\six.py", line 701, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\_vendor\six.py", line 692, in exec_
AttributeError: 'module' object has no attribute '_getframe'
In this website this guy solves the issue using this last workaround, however it didnt work for me.
http://it-kosmopolit.de/blog/2015/08/31/install-robot-framework-with-ironpython-on-windows/
Thank you in advance.
This is how I resolve it, however I dont intend to say is the way to resolve it.
There are installers .exe of Robot Framework for Windows but they are not intended to be on IronPython, but Python. Keeping in mind that I already got the IronPython folder, what I did is:
install Python
downloand and install the RF installer .exe file from here https://pypi.python.org/pypi/robotframework/2.8.5
install it pointing to the Python directory (it doesnt recognize the IronPython folder)
Simply added the ipy.exe from my IronPython folder to the PATH variable.
Surprisingly it worked with no more headache, I have now Robot Framework on IronPython.
I recently installed a new verion of Anaconda 3 4.2 on a windows laptop.
All the packages work fine , but pandas never worked for me from day 1.
So i thought of uninstalling and installing a new version of pandas 0.19
While using pip:
C:\Users\>python -m pip install --user pandas
Collecting pandas
Using cached pandas-0.19.2-cp35-cp35m-win_amd64.whl
Exception:
Traceback (most recent call last):
File "D:\Anaconda3-4.2\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "D:\Anaconda3-4.2\lib\site-packages\pip\commands\install.py", line 335, in run
wb.build(autobuilding=True)
File "D:\Anaconda3-4.2\lib\site-packages\pip\wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "D:\Anaconda3-4.2\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "D:\Anaconda3-4.2\lib\site-packages\pip\req\req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "D:\Anaconda3-4.2\lib\site-packages\pip\download.py", line 821, in unpack_url
hashes=hashes
File "D:\Anaconda3-4.2\lib\site-packages\pip\download.py", line 663, in unpack_http_url
unpack_file(from_path, location, content_type, link)
File "D:\Anaconda3-4.2\lib\site-packages\pip\utils\__init__.py", line 599, in unpack_file
flatten=not filename.endswith('.whl')
File "D:\Anaconda3-4.2\lib\site-packages\pip\utils\__init__.py", line 499, in unzip_file
fp = open(fn, 'wb')
PermissionError: [Errno 13] Permission denied: C:\\Users\\AppData\\Local\\Temp\\pip-build-h5ip5q8f\\pandas\\pandas/io/tests/data/blank.xls
While using conda :
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : win-64
conda version : 4.3.8
conda is private : False
conda-env version : 4.3.8
conda-build version : 2.0.2
python version : 3.5.2.final.0
requests version : 2.12.4
root environment : D:\Anaconda3-4.2 (writable)
default environment : D:\Anaconda3-4.2
envs directories : D:\Anaconda3-4.2\envs
package cache : D:\Anaconda3-4.2\pkgs
channel URLs : https://repo.continuum.io/pkgs/free/win-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/r/win-64
https://repo.continuum.io/pkgs/r/noarch
https://repo.continuum.io/pkgs/pro/win-64
https://repo.continuum.io/pkgs/pro/noarch
https://repo.continuum.io/pkgs/msys2/win-64
https://repo.continuum.io/pkgs/msys2/noarch
config file : None
offline mode : False
user-agent : conda/4.3.8 requests/2.12.4 CPython/3.5.2 Windows/7
Windows/6.1.7601
D:\Anaconda3-4.2\Scripts\conda-script.py install pandas
Traceback (most recent call last):
File "D:\Anaconda3-4.2\lib\site-packages\conda\exceptions.py", line 617, in conda_exception_handler
return_value = func(*args, **kwargs)
File "D:\Anaconda3-4.2\lib\site-packages\conda\cli\main.py", line 137, in _main
exit_code = args.func(args, p)
File "D:\Anaconda3-4.2\lib\site-packages\conda\cli\main_install.py", line 80, in execute
install(args, parser, 'install')
File "D:\Anaconda3-4.2\lib\site-packages\conda\cli\install.py", line 347, in install
execute_actions(actions, index, verbose=not context.quiet)
File "D:\Anaconda3-4.2\lib\site-packages\conda\plan.py", line 837, in execute_actions
execute_instructions(plan, index, verbose)
File "D:\Anaconda3-4.2\lib\site-packages\conda\instructions.py", line 258, in execute_instructions
cmd(state, arg)
File "D:\Anaconda3-4.2\lib\site-packages\conda\instructions.py", line 118, in UNLINKLINKTRANSACTION_CMD
txn = UnlinkLinkTransaction.create_from_dists(index, prefix, unlink_dists, link_dists)
File "D:\Anaconda3-4.2\lib\site-packages\conda\core\link.py", line 121, in create_from_dists
for dist, pkg_dir in zip(link_dists, pkg_dirs_to_link))
File "D:\Anaconda3-4.2\lib\site-packages\conda\core\link.py", line 121, in <genexpr>
for dist, pkg_dir in zip(link_dists, pkg_dirs_to_link))
File "D:\Anaconda3-4.2\lib\site-packages\conda\gateways\disk\read.py", line 71, in read_package_info
index_json_record = read_index_json(extracted_package_directory)
File "D:\Anaconda3-4.2\lib\site-packages\conda\gateways\disk\read.py", line 94, in read_index_json
with open(join(extracted_package_directory, 'info', 'index.json')) as fi:
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\Anaconda3-4.2\\pkgs\\pandas-0.19.2-np111py35_1\\info\\index.json
The problem is that you are trying to install Pandas as a regular user, and therefore cannot change the contents of Anaconda installation folder (where Python installed packages live). You need to run CMD or PowerShell (whichever you are using) as an administrator. Right-click on its shortcut in the start menu and click "Run as administrator", then run again the same command.
Try to use Anaconda package manager - conda instead of pip:
C:\> conda install pandas
I am trying to get ldap authentication to work on Plone version 4.2. I have hammered at the issue for several hours without results. I have even tried these steps:
Install python-ldap 2.6 (C:\Python26)
Install Plone 4.2 with the installer (D:\Plone)
Edit buildout.cfg with plone.app.ldap in the EGG and ZCML section
Create a new folder called python_ldap-2.3.12-py2.6.egg in D:\Plone\buildout-cache\eggs\
Copy C:\Python26\lib\site-packages\python_ldap-2.3.12-py2.6.egg-info to D:\Plone\buildout-cache\eggs\python_ldap-2.3.12-py2.6.egg\ and rename to EGG-INFO
Also copy the ldap folder in C:\Python26\lib\site-packages\ to D:\Plone\buildout-cache\eggs\python_ldap-2.3.12-py2.6.egg\
Also copy the file ldapurl.py to C:\Python26\lib\site-packages\ to D:\Plone\buildout-cache\eggs\python_ldap-2.3.12-py2.6.egg\
Next copy:
folder: C:\Python26\lib\site-packages\python_ldap-2.3.12-py2.6.egg-info
folder: C:\Python26\lib\site-packages\ldap
to D:\Plone\python\Lib\site-packages
Start commandbox and run bin\buildout
Start Plone, log in as admin and go to the extra products section. Here you will find the LDAP product. Install it and enter you LDAP details.
None of that really helped. When i try bin/buildout, I get the following message:
Installing instance.
Getting distribution for 'dataflake.fakeldap'.
zip_safe flag not set; analyzing archive contents...
Installed /tmp/easy_install-oISsVG/dataflake.fakeldap-1.0/setuptools_git-0.4.2-py2.6.egg
Got dataflake.fakeldap 1.0.
Generated script '/usr/local/Plone/zinstance/bin/instance'.
Installing zopepy.
Generated interpreter '/usr/local/Plone/zinstance/bin/zopepy'.
Installing zopeskel.
Generated script '/usr/local/Plone/zinstance/bin/zopeskel'.
Generated script '/usr/local/Plone/zinstance/bin/paster'.
Updating backup.
Updating chown.
chown: Running
echo Dummy references to force this to execute after referenced parts
echo /usr/local/Plone/zinstance/var/backups sudo -u plone
chmod 600 .installed.cfg
find /usr/local/Plone/zinstance/var -type d -exec chmod 700 {} \;
chmod 744 /usr/local/Plone/zinstance/bin/*
Dummy references to force this to execute after referenced parts
/usr/local/Plone/zinstance/var/backups sudo -u plone
Updating repozo.
Updating unifiedinstaller.
*************** PICKED VERSIONS ****************
[versions]
Products.LDAPMultiPlugins = 1.14
Products.LDAPUserFolder = 2.23
Products.PloneLDAP = 1.1
collective.sendaspdf = 2.6
dataflake.fakeldap = 1.0
jquery.pyproxy = 0.4.1
plone.app.ldap = 1.2.8
*************** /PICKED VERSIONS ***************
When I try bin/buildout, it says daemon process started and gives an id but when i try localhost:8080, it says "Problem loading page" and the page does not load. I tried bin/instance fg to display the errors and i following message.
bin/instance fg
2012-07-24 08:53:18 INFO ZServer HTTP server started at Tue Jul 24 08:53:18 2012
Hostname: 0.0.0.0
Port: 8080
2012-07-24 08:53:18 INFO Zope Set effective user to "plone"
2012-07-24 08:53:19 WARNING SecurityInfo Conflicting security declarations for "setText"
2012-07-24 08:53:19 WARNING SecurityInfo Class "ATTopic" had conflicting security declarations
2012-07-24 08:53:19 ERROR Application Could not import Products.LDAPMultiPlugins
Traceback (most recent call last):
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/OFS/Application.py", line 606, in import_product
product=__import__(pname, global_dict, global_dict, silly)
File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPMultiPlugins-1.14-py2.6.egg/Products/LDAPMultiPlugins/__init__.py", line 22, in <module>
from Products.LDAPMultiPlugins.LDAPMultiPlugin import addLDAPMultiPluginForm
File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPMultiPlugins-1.14-py2.6.egg/Products/LDAPMultiPlugins/LDAPMultiPlugin.py", line 29, in <module>
from Products.LDAPUserFolder import manage_addLDAPUserFolder
File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPUserFolder-2.23-py2.6.egg/Products/LDAPUserFolder/__init__.py", line 20, in <module>
from Products.LDAPUserFolder.LDAPUserFolder import LDAPUserFolder
File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPUserFolder-2.23-py2.6.egg/Products/LDAPUserFolder/LDAPUserFolder.py", line 52, in <module>
from Products.LDAPUserFolder.LDAPDelegate import filter_format
File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPUserFolder-2.23-py2.6.egg/Products/LDAPUserFolder/LDAPDelegate.py", line 19, in <module>
import ldap
File "/usr/local/Plone/buildout-cache/eggs/python_ldap-2.3.12-py2.6.egg/ldap/__init__.py", line 22, in <module>
from _ldap import *
ImportError: No module named _ldap
Traceback (most recent call last):
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/Zope2/Startup/run.py", line 76, in <module>
run()
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/Zope2/Startup/run.py", line 22, in run
starter.prepare()
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/Zope2/Startup/__init__.py", line 86, in prepare
self.startZope()
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/Zope2/Startup/__init__.py", line 259, in startZope
Zope2.startup()
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/Zope2/__init__.py", line 47, in startup
_startup()
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/Zope2/App/startup.py", line 67, in startup
OFS.Application.import_products()
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/OFS/Application.py", line 583, in import_products
import_product(product_dir, product_name, raise_exc=debug_mode)
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/OFS/Application.py", line 606, in import_product
product=__import__(pname, global_dict, global_dict, silly)
File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPMultiPlugins-1.14-py2.6.egg/Products/LDAPMultiPlugins/__init__.py", line 22, in <module>
from Products.LDAPMultiPlugins.LDAPMultiPlugin import addLDAPMultiPluginForm
File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPMultiPlugins-1.14-py2.6.egg/Products/LDAPMultiPlugins/LDAPMultiPlugin.py", line 29, in <module>
from Products.LDAPUserFolder import manage_addLDAPUserFolder
File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPUserFolder-2.23-py2.6.egg/Products/LDAPUserFolder/__init__.py", line 20, in <module>
from Products.LDAPUserFolder.LDAPUserFolder import LDAPUserFolder
File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPUserFolder-2.23-py2.6.egg/Products/LDAPUserFolder/LDAPUserFolder.py", line 52, in <module>
from Products.LDAPUserFolder.LDAPDelegate import filter_format
File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPUserFolder-2.23-py2.6.egg/Products/LDAPUserFolder/LDAPDelegate.py", line 19, in <module>
import ldap
File "/usr/local/Plone/buildout-cache/eggs/python_ldap-2.3.12-py2.6.egg/ldap/__init__.py", line 22, in <module>
from _ldap import *
ImportError: No module named _ldap
What am i doing wrong? Help wil be deeply appreciated
Your buildout ran successfully, there were no problems there. Some of the packages you picked were not pinned, so your buildout reported what versions it choose for you.
Your server itself is not indeed running because the Python LDAP egg you installed seems to be incorrectly installed. The buildout-cache/eggs/python_ldap-2.3.12-py2.6.egg/ldap/_ldap.so library file is missing.
Remove the whole egg (rm -rf buildout-cache-eggs/python_ldap-2.3.12-py2.6.egg) make sure you have the OpenLDAP 2.x library and headers installed on your system (on Ubuntu and Debian the libldap2-dev should be enough). Then re-run buildout to reinstall the egg.
Alternatively, you could try and install the system python-ldap package (remove the egg) and see if buildout picks that up instead.
You need to install 2 libs:
sudo apt-get install libldap2-dev
sudo apt-get install libsasl2-dev
Hope that will help.