I want to use cookiecutter to start a django project but for some reason cookiecutter cannot be found.
What I did was:
pip install cookiecutter
After that:
cookiecutter https://github.com/pydanny/cookiecutter-django
Then I get the error message:
The program 'cookiecutter' is currently not installed. You can install it by typing:
sudo apt install cookiecutter
However when I install cookiecutter with apt and run cookiecutter https://github.com/pydanny/cookiecutter-django
I get an error.
Traceback (most recent call last):
File "/usr/bin/cookiecutter", line 9, in <module>
load_entry_point('cookiecutter==1.3.0', 'console_scripts', 'cookiecutter')()
File "/usr/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/cookiecutter/cli.py", line 100, in main
config_file=user_config
File "/usr/lib/python2.7/dist-packages/cookiecutter/main.py", line 140, in cookiecutter
output_dir=output_dir
File "/usr/lib/python2.7/dist-packages/cookiecutter/generate.py", line 327, in generate_files
generate_file(project_dir, infile, context, env)
File "/usr/lib/python2.7/dist-packages/cookiecutter/generate.py", line 167, in generate_file
tmpl = env.get_template(infile_fwd_slashes)
File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 812, in get_template
return self._load_template(name, self.make_globals(globals))
File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 786, in _load_template
template = self.loader.load(self, name, globals)
File "/usr/lib/python2.7/dist-packages/jinja2/loaders.py", line 125, in load
code = environment.compile(source, name, filename)
File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 565, in compile
self.handle_exception(exc_info, source_hint=source_hint)
File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File "./LICENSE", line 3, in template
jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'now'. Jinja was looking for the following tags: 'elif' or 'else' or 'endif'. The innermost block that needs to be closed is 'if'.
File "./LICENSE", line 3
Copyright (c) {% now 'utc', '%Y' %}, {{ cookiecutter.author_name }}
I understand this has to do with the version of cookiecutter which has to be >=1.4
The pip package is version 1.4, but that won't run.
What am I missing here?
I am using virtualbox so therefore this is not inside a virtualenv.