cookiecutter を使用して django プロジェクトを開始したいのですが、何らかの理由で cookiecutter が見つかりません。
私がしたことは:
pip install cookiecutter
その後:
cookiecutter https://github.com/pydanny/cookiecutter-django
次に、エラーメッセージが表示されます:
The program 'cookiecutter' is currently not installed. You can install it by typing:
sudo apt install cookiecutter
ただし、apt を使用して cookiecutter をインストールして実行するcookiecutter https://github.com/pydanny/cookiecutter-django
と、エラーが発生します。
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 }}
これは、>=1.4 でなければならない cookiecutter のバージョンと関係があることを理解しています。pip
パッケージはバージョン 1.4 ですが、実行されません。
ここで何が欠けていますか?
私はvirtualboxを使用しているため、これはvirtualenv内にはありません。