Not able to get started with bench in Ubuntu 14.0.4

I am new comer. Not able to figure how to get started with bench even after following various threads in this forum and elsewhere.

install.py run successfully. (had mariadb and other errors, but whtmltopdf errors but figured out somehow.)

Then tried bench new-site and bench start.

Bench starts has some issues in redis i guess. Following is the trace:

1 0:52:45 system | worker_long.1 started (pid=8856)
10:52:45 system | redis_socketio.1 started (pid=8854)
10:52:45 redis_socketio.1 | [8859] 15 Sep 10:52:45.752 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
10:52:45 redis_socketio.1 | .
10:52:45 redis_socketio.1 | .-__ ''-._ 10:52:45 redis_socketio.1 | _.- . . ‘’-._ Redis 2.8.4 (00000000/0) 64 bit
10:52:45 redis_socketio.1 | .- .-```. ```\/ _.,_ ''-._ 10:52:45 redis_socketio.1 | ( ' , .-` | `, ) Running in stand alone mode 10:52:45 redis_socketio.1 | |`-._`-...-` __...-.-.|'_.-'| Port: 12000 10:52:45 redis_socketio.1 | | -. ._ / _.-' | PID: 8859 10:52:45 redis_socketio.1 | -._ -._ -./ .-’ .-’
10:52:45 redis_socketio.1 | |-._-.
-.__.-' _.-'_.-'| 10:52:45 redis_socketio.1 | | -.
-._ _.-'_.-' | http://redis.io 10:52:45 redis_socketio.1 | -._ -._-..-'.-’ .-’
10:52:45 redis_socketio.1 | |-._-.
-.__.-' _.-'_.-'| 10:52:45 redis_socketio.1 | | -.
-._ _.-'_.-' | 10:52:45 redis_socketio.1 | -._ -._-.
.-‘_.-’ _.-’
10:52:45 redis_socketio.1 | -._ -..-’ _.-’
10:52:45 redis_socketio.1 | -._ _.-' 10:52:45 redis_socketio.1 | -.
.-’
10:52:45 redis_socketio.1 |
10:52:45 redis_socketio.1 | [8859] 15 Sep 10:52:45.753 # Server started, Redis version 2.8.4
10:52:45 redis_socketio.1 | [8859] 15 Sep 10:52:45.753 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.

i tried

$bench new-site local 

INFO:bench.utils:creating new site local
frappe app is not installed. Run the following command to install frappe
bench get-app https://github.com/frappe/frappe.git
/bin/sh: 1: /home/maverick/frappe-bench/env/bin/frappe: not found
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/maverick/.bench/bench/cli.py", line 40, in cli
    bench_command()

tried to install frappe app it says frappe already exists

maverick@falcon:~/frappe-bench$ bench  get-app https://github.com/frappe/frappe.git
INFO:bench.app:getting app frappe
fatal: destination path 'frappe' already exists and is not an empty directory.
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/maverick/.bench/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/maverick/.bench/bench/commands/make.py", line 30, in get_app
    get_app(git_url, branch=branch)
  File "/home/maverick/.bench/bench/app.py", line 62, in get_app
    cwd=os.path.join(bench_path, 'apps'))
  File "/home/maverick/.bench/bench/utils.py", line 127, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git clone https://github.com/frappe/frappe.git   --origin upstream

somwhere in some forums i saw someone mentioning try bench update. Had issue of node.js version there, fixed that, but then even in vain landed with following error:

maverick@falcon:~/frappe-bench$ bench update --requirements 
The directory '/home/maverick/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/maverick/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages
The directory '/home/maverick/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/maverick/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
/home/maverick/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/home/maverick/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
/home/maverick/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/home/maverick/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Command "/home/maverick/frappe-bench/env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-H2byyr/python-ldap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-bbvSaI-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/maverick/frappe-bench/env/include/site/python2.7/python-ldap" failed with error code 1 in /tmp/pip-build-H2byyr/python-ldap/
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/maverick/.bench/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/maverick/.bench/bench/commands/update.py", line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
  File "/home/maverick/.bench/bench/commands/update.py", line 79, in _update
    update_requirements(bench_path=bench_path)
  File "/home/maverick/.bench/bench/utils.py", line 375, in update_requirements
    install_requirements(pip, req_file)
  File "/home/maverick/.bench/bench/utils.py", line 379, in install_requirements
    exec_cmd("{pip} install -q -r {req_file}".format(pip=pip, req_file=req_file))
  File "/home/maverick/.bench/bench/utils.py", line 127, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -r ./apps/frappe/requirements.txt

Checked python version. Its 2.7.6.

I think I am practically stuck with no ideas how to proceed ahead. A help would be most appreciative.

I am using Ubuntu 14.0.4

Thanks and regards,

Parth

Run ./env/bin/pip install -r ./apps/frappe/requirements.txt
and see what error you get.

1 Like

@KanchanChauhan thanks for the reply. Appreciate your time.

Please see the trace below:

maverick@falcon:~/frappe-bench$ ./env/bin/pip install -r ./apps/frappe/requirements.txt
The directory '/home/maverick/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/maverick/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied (use --upgrade to upgrade): chardet in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): cssmin in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 2))
Requirement already satisfied (use --upgrade to upgrade): dropbox in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): gunicorn in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 4))
Requirement already satisfied (use --upgrade to upgrade): httplib2 in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 5))
Requirement already satisfied (use --upgrade to upgrade): jinja2 in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 6))
Requirement already satisfied (use --upgrade to upgrade): markdown2 in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 7))
Requirement already satisfied (use --upgrade to upgrade): markupsafe in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 8))
Requirement already satisfied (use --upgrade to upgrade): mysql-python==1.2.5 in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 9))
Requirement already satisfied (use --upgrade to upgrade): python-geoip in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 10))
Requirement already satisfied (use --upgrade to upgrade): python-geoip-geolite2 in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 11))
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 12))
Requirement already satisfied (use --upgrade to upgrade): pytz in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 13))
Requirement already satisfied (use --upgrade to upgrade): six in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 14))
Requirement already satisfied (use --upgrade to upgrade): termcolor in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 15))
Requirement already satisfied (use --upgrade to upgrade): werkzeug in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 16))
Requirement already satisfied (use --upgrade to upgrade): semantic_version in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 17))
Requirement already satisfied (use --upgrade to upgrade): rauth>=0.6.2 in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 18))
Requirement already satisfied (use --upgrade to upgrade): requests in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 19))
Requirement already satisfied (use --upgrade to upgrade): redis in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 20))
Requirement already satisfied (use --upgrade to upgrade): selenium in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 21))
Obtaining pdfkit from git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit (from -r ./apps/frappe/requirements.txt (line 22))
  Updating ./env/src/pdfkit clone
Requirement already satisfied (use --upgrade to upgrade): babel in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 23))
Requirement already satisfied (use --upgrade to upgrade): ipython in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 24))
Requirement already satisfied (use --upgrade to upgrade): html2text in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 25))
Requirement already satisfied (use --upgrade to upgrade): email_reply_parser in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 26))
Requirement already satisfied (use --upgrade to upgrade): click in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 27))
Requirement already satisfied (use --upgrade to upgrade): num2words in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 28))
Requirement already satisfied (use --upgrade to upgrade): watchdog==0.8.0 in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 29))
Requirement already satisfied (use --upgrade to upgrade): bleach in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 30))
Requirement already satisfied (use --upgrade to upgrade): bleach-whitelist in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 31))
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 32))
Requirement already satisfied (use --upgrade to upgrade): beautifulsoup4 in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 33))
Requirement already satisfied (use --upgrade to upgrade): rq in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 34))
Requirement already satisfied (use --upgrade to upgrade): schedule in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 35))
Requirement already satisfied (use --upgrade to upgrade): cryptography in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 36))
Requirement already satisfied (use --upgrade to upgrade): zxcvbn in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 37))
Requirement already satisfied (use --upgrade to upgrade): psutil in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 38))
Requirement already satisfied (use --upgrade to upgrade): unittest-xml-reporting in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 39))
Requirement already satisfied (use --upgrade to upgrade): xlwt in ./env/lib/python2.7/site-packages (from -r ./apps/frappe/requirements.txt (line 40))
Collecting python-ldap (from -r ./apps/frappe/requirements.txt (line 41))
/home/maverick/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/home/maverick/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading python-ldap-2.4.27.tar.gz (125kB)
    100% |████████████████████████████████| 133kB 16kB/s 
Requirement already satisfied (use --upgrade to upgrade): urllib3 in ./env/lib/python2.7/site-packages (from dropbox->-r ./apps/frappe/requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): typing>=3.5.2 in ./env/lib/python2.7/site-packages (from dropbox->-r ./apps/frappe/requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): decorator in ./env/lib/python2.7/site-packages (from ipython->-r ./apps/frappe/requirements.txt (line 24))
Requirement already satisfied (use --upgrade to upgrade): setuptools>=18.5 in ./env/lib/python2.7/site-packages (from ipython->-r ./apps/frappe/requirements.txt (line 24))
Requirement already satisfied (use --upgrade to upgrade): pickleshare in ./env/lib/python2.7/site-packages (from ipython->-r ./apps/frappe/requirements.txt (line 24))
Requirement already satisfied (use --upgrade to upgrade): backports.shutil-get-terminal-size; python_version == "2.7" in ./env/lib/python2.7/site-packages (from ipython->-r ./apps/frappe/requirements.txt (line 24))
Requirement already satisfied (use --upgrade to upgrade): pygments in ./env/lib/python2.7/site-packages (from ipython->-r ./apps/frappe/requirements.txt (line 24))
Requirement already satisfied (use --upgrade to upgrade): pexpect; sys_platform != "win32" in ./env/lib/python2.7/site-packages (from ipython->-r ./apps/frappe/requirements.txt (line 24))
Requirement already satisfied (use --upgrade to upgrade): pathlib2; python_version == "2.7" or python_version == "3.3" in ./env/lib/python2.7/site-packages (from ipython->-r ./apps/frappe/requirements.txt (line 24))
Requirement already satisfied (use --upgrade to upgrade): simplegeneric>0.8 in ./env/lib/python2.7/site-packages (from ipython->-r ./apps/frappe/requirements.txt (line 24))
Requirement already satisfied (use --upgrade to upgrade): prompt-toolkit<2.0.0,>=1.0.3 in ./env/lib/python2.7/site-packages (from ipython->-r ./apps/frappe/requirements.txt (line 24))
Requirement already satisfied (use --upgrade to upgrade): traitlets>=4.2 in ./env/lib/python2.7/site-packages (from ipython->-r ./apps/frappe/requirements.txt (line 24))
Requirement already satisfied (use --upgrade to upgrade): PyYAML>=3.10 in ./env/lib/python2.7/site-packages (from watchdog==0.8.0->-r ./apps/frappe/requirements.txt (line 29))
Requirement already satisfied (use --upgrade to upgrade): argh>=0.24.1 in ./env/lib/python2.7/site-packages (from watchdog==0.8.0->-r ./apps/frappe/requirements.txt (line 29))
Requirement already satisfied (use --upgrade to upgrade): pathtools>=0.1.1 in ./env/lib/python2.7/site-packages (from watchdog==0.8.0->-r ./apps/frappe/requirements.txt (line 29))
Requirement already satisfied (use --upgrade to upgrade): html5lib<0.99999999,>=0.999 in ./env/lib/python2.7/site-packages (from bleach->-r ./apps/frappe/requirements.txt (line 30))
Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in ./env/lib/python2.7/site-packages (from cryptography->-r ./apps/frappe/requirements.txt (line 36))
Requirement already satisfied (use --upgrade to upgrade): ipaddress in ./env/lib/python2.7/site-packages (from cryptography->-r ./apps/frappe/requirements.txt (line 36))
Requirement already satisfied (use --upgrade to upgrade): enum34 in ./env/lib/python2.7/site-packages (from cryptography->-r ./apps/frappe/requirements.txt (line 36))
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.8 in ./env/lib/python2.7/site-packages (from cryptography->-r ./apps/frappe/requirements.txt (line 36))
Requirement already satisfied (use --upgrade to upgrade): cffi>=1.4.1 in ./env/lib/python2.7/site-packages (from cryptography->-r ./apps/frappe/requirements.txt (line 36))
Requirement already satisfied (use --upgrade to upgrade): ptyprocess>=0.5 in ./env/lib/python2.7/site-packages (from pexpect; sys_platform != "win32"->ipython->-r ./apps/frappe/requirements.txt (line 24))
Requirement already satisfied (use --upgrade to upgrade): wcwidth in ./env/lib/python2.7/site-packages (from prompt-toolkit<2.0.0,>=1.0.3->ipython->-r ./apps/frappe/requirements.txt (line 24))
Requirement already satisfied (use --upgrade to upgrade): ipython-genutils in ./env/lib/python2.7/site-packages (from traitlets>=4.2->ipython->-r ./apps/frappe/requirements.txt (line 24))
Requirement already satisfied (use --upgrade to upgrade): pycparser in ./env/lib/python2.7/site-packages (from cffi>=1.4.1->cryptography->-r ./apps/frappe/requirements.txt (line 36))
Installing collected packages: pdfkit, python-ldap
  Running setup.py develop for pdfkit
  Running setup.py install for python-ldap ... error
    Complete output from command /home/maverick/frappe-bench/env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-K6xfCM/python-ldap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-JnkkjY-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/maverick/frappe-bench/env/include/site/python2.7/python-ldap:
    defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
    extra_compile_args:
    extra_objects:
    include_dirs: /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl
    library_dirs: /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64
    libs: ldap_r
    running install
    running build
    running build_py
    file Lib/ldap.py (for module ldap) not found
    file Lib/ldap/controls.py (for module ldap.controls) not found
    file Lib/ldap/extop.py (for module ldap.extop) not found
    file Lib/ldap/schema.py (for module ldap.schema) not found
    creating build
    creating build/lib.linux-x86_64-2.7
    copying Lib/ldapurl.py -> build/lib.linux-x86_64-2.7
    copying Lib/ldif.py -> build/lib.linux-x86_64-2.7
    copying Lib/dsml.py -> build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/__init__.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/async.py -> build/lib.linux-x86_64-2.7/ldap
    creating build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/__init__.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/dn.py -> build/lib.linux-x86_64-2.7/ldap
    creating build/lib.linux-x86_64-2.7/ldap/extop
    copying Lib/ldap/extop/__init__.py -> build/lib.linux-x86_64-2.7/ldap/extop
    copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-2.7/ldap/extop
    copying Lib/ldap/filter.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/functions.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/logger.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-2.7/ldap
    creating build/lib.linux-x86_64-2.7/ldap/schema
    copying Lib/ldap/schema/__init__.py -> build/lib.linux-x86_64-2.7/ldap/schema
    copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-2.7/ldap/schema
    copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-2.7/ldap/schema
    copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-2.7/ldap/schema
    copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-2.7/ldap
    file Lib/ldap.py (for module ldap) not found
    file Lib/ldap/controls.py (for module ldap.controls) not found
    file Lib/ldap/extop.py (for module ldap.extop) not found
    file Lib/ldap/schema.py (for module ldap.schema) not found
    running egg_info
    writing requirements to Lib/python_ldap.egg-info/requires.txt
    writing Lib/python_ldap.egg-info/PKG-INFO
    writing top-level names to Lib/python_ldap.egg-info/top_level.txt
    writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
    warning: manifest_maker: standard file '-c' not found
    
    file Lib/ldap.py (for module ldap) not found
    file Lib/ldap/controls.py (for module ldap.controls) not found
    file Lib/ldap/extop.py (for module ldap.extop) not found
    file Lib/ldap/schema.py (for module ldap.schema) not found
    reading manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'Makefile'
    warning: no files found matching 'Modules/LICENSE'
    writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
    running build_ext
    building '_ldap' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/Modules
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.27 -IModules -I/usr/include -I/usr/include/sasl -I/usr/local/include -I/usr/local/include/sasl -I/usr/include/python2.7 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-2.7/Modules/LDAPObject.o
    In file included from Modules/LDAPObject.c:9:0:
    Modules/errors.h:8:18: fatal error: lber.h: No such file or directory
     #include "lber.h"
                      ^
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/home/maverick/frappe-bench/env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-K6xfCM/python-ldap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-JnkkjY-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/maverick/frappe-bench/env/include/site/python2.7/python-ldap" failed with error code 1 in /tmp/pip-build-K6xfCM/python-ldap/
maverick@falcon:~/frappe-bench$

Always perform search on forum or google, before you post. You may never need to wait, if similar question is already answered.
Cause: Your LDAP module dependencies failing, you do not have necessary packages installed on system.
Solution:

1 Like