Can't install Cookiecutter please?

1.4k Views Asked by At

I've tried installing an existing cookiecutter ([email protected]:Dekalabs/cookiecutter-backend.git) both from ubuntu and the windows terminal, and I get the following error:

Traceback (most recent call last):
  File "c:\users\lisa\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\lisa\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Lisa\AppData\Local\Programs\Python\Python37-32\Scripts\cookiecutter.exe\__main__.py", line 7, in <module>
  File "c:\users\lisa\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\lisa\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "c:\users\lisa\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\lisa\appdata\local\programs\python\python37-32\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "c:\users\lisa\appdata\local\programs\python\python37-32\lib\site-packages\cookiecutter\cli.py", line 152, in main
    skip_if_file_exists=skip_if_file_exists,
  File "c:\users\lisa\appdata\local\programs\python\python37-32\lib\site-packages\cookiecutter\main.py", line 74, in cookiecutter
    directory=directory,
  File "c:\users\lisa\appdata\local\programs\python\python37-32\lib\site-packages\cookiecutter\repository.py", line 114, in determine_repo_dir
    no_input=no_input,
  File "c:\users\lisa\appdata\local\programs\python\python37-32\lib\site-packages\cookiecutter\vcs.py", line 104, in clone
    stderr=subprocess.STDOUT,
  File "c:\users\lisa\appdata\local\programs\python\python37-32\lib\subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "c:\users\lisa\appdata\local\programs\python\python37-32\lib\subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'clone', '[email protected]:Dekalabs/cookiecutter-backend.git']' returned non-zero exit status 128.

I've read through a few other posts with similar errors but can't seem to be able to figure it out. Please advise! :)

2

There are 2 best solutions below

2
On

I have a similar problem trying run:

https://github.com/adafruit/cookiecutter-adafruit-circuitpython.git

the process terminates with the following error

subprocess.CalledProcessError: Command '['git', 'clone', 'https://github.com/adafruit/cookiecutter-adafruit-circuitpython.git']' returned non-zero exit status 128.

have tried git config --global http.sslVerify false but no success

0
On

This is caused by failure of command git clone.

A workaround:

You can go to ithub.com:Dekalabs/cookiecutter-backend.git, download the whole source package as zip, then extract it, for example, to /tmp/cookiecutter-backend.

Then run the following command:

cookiecutter /tmp/cookiecutter-backend

For normal python package template, you can just use ppw (Python Project Wizard), it's cookiecutter based too, but it has both cookiecutter and template packaged, so you can run it in a easy way:

pip install ppw
ppw

then follow the instructions to initiate the new project.