Error while trying to install custom app

Hello,
I am getting these errors while trying to install a custom app via the bench get-app command.
What could be wrong?

> remote: Counting objects: 404, done.
> remote: Compressing objects: 100% (262/262), done.
> remote: Total 404 (delta 228), reused 221 (delta 133)
> Receiving objects: 100% (404/404), 2.48 MiB | 1.03 MiB/s, done.
> Resolving deltas: 100% (228/228), done.
> Checking connectivity... done.
> ('installing', u'myapp_erpnext')
> INFO:bench.app:installing myapp_erpnext
> INFO:bench.utils:./env/bin/pip install -q  -e ./apps/myapp_erpnext --no-cache-dir
> Exception:
> Traceback (most recent call last):
>   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
>     status = self.run(options, args)
>   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/commands/install.py", line 324, in run
>     requirement_set.prepare_files(finder)
>   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
>     ignore_dependencies=self.ignore_dependencies))
>   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/req/req_set.py", line 521, in _prepare_file
>     req_to_install.check_if_exists()
>   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/req/req_install.py", line 1036, in check_if_exists
>     self.req.name
>   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 558, in get_distribution
>     dist = get_provider(dist)
>   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 432, in get_provider
>     return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
>   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 968, in require
>     needed = self.resolve(parse_requirements(requirements))
>   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 859, in resolve
>     raise VersionConflict(dist, req).with_context(dependent_req)
> ContextualVersionConflict: (python-dateutil 2.7.2 (/home/frappe/frappe-bench/env/lib/python2.7/site-packages), Requirement.parse('python-dateutil<2.7.0,>=2.1'), set(['botocore']))
> Traceback (most recent call last):
>   File "/usr/local/bin/bench", line 11, in <module>
>     load_entry_point('bench', 'console_scripts', 'bench')()
>   File "/home/frappe/.bench/bench/cli.py", line 40, in cli
>     bench_command()
>   File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
>     return self.main(*args, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
>     rv = self.invoke(ctx)
>   File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
>     return _process_result(sub_ctx.command.invoke(sub_ctx))
>   File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
>     return ctx.invoke(self.callback, **ctx.params)
>   File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
>     return callback(*args, **kwargs)
>   File "/home/frappe/.bench/bench/commands/make.py", line 40, in get_app
>     get_app(git_url, branch=branch)
>   File "/home/frappe/.bench/bench/app.py", line 133, in get_app
>     install_app(app=app_name, bench_path=bench_path, verbose=verbose)
>   File "/home/frappe/.bench/bench/app.py", line 164, in install_app
>     find_links=find_links))
>   File "/home/frappe/.bench/bench/utils.py", line 153, in exec_cmd
>     raise CommandFailedError(cmd)
> bench.utils.CommandFailedError: ./env/bin/pip install -q  -e ./apps/myapp_erpnext --no-cache-dir```

A look at the traceback shows this problem

ContextualVersionConflict: (python-dateutil 2.7.2 (/home/frappe/frappe-bench/env/lib/python2.7/site-packages), Requirement.parse(β€˜python-dateutil<2.7.0,>=2.1’), set([β€˜botocore’]))

And a search shows these too related to it:

How to fix this botocore requirement?
Error Messages while running bench update

Thanks @clarkej for the pointers.

I was able to get it working by downgrading dateutil to version 2.6.1 by running the following command but also got a few warnings during the process:

frappe@vmi173732:~/frappe-bench$ sudo pip install "python-dateutil<2.7.0,>=2.1"

[sudo] password for frappe:

The directory '/home/frappe/.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/frappe/.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.
Collecting python-dateutil<2.7.0,>=2.1
  Downloading https://files.pythonhosted.org/packages/4b/0d/7ed381ab4fe80b8ebf34411d14f253e1cf3e56e2820ffa1d8844b23859a2/python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 194kB 6.3MB/s
Requirement already satisfied: six>=1.5 in /usr/local/lib/python2.7/dist-packages (from python-dateutil<2.7.0,>=2.1) (1.11.0)
Installing collected packages: python-dateutil
  Found existing installation: python-dateutil 2.7.2
    Uninstalling python-dateutil-2.7.2:
      Successfully uninstalled python-dateutil-2.7.2
Successfully installed python-dateutil-2.6.1
2 Likes