Cookiecutter fails to install the project after a cookiecutter template was cloned
See original GitHub issueIn latest Visual studio 2017I go to File --> New -->–> From Cookiecutter. Then I select an arbitrary template and click Run or Next. I see in the output window that the repository is cloned, but then I get an error, e.g.
----- Cloning template 'audreyr/cookiecutter-pypackage' -----
Cloning into 'cookiecutter-pypackage'...
----- Successfully cloned template 'audreyr/cookiecutter-pypackage' to 'C:\Users\pavol\.cookiecutters\cookiecutter-pypackage' -----
----- Installing cookiecutter -----
C:\tools\Anaconda3\python.exe returned an exit code of 1.
----- Failed to install cookiecutter -----
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:12 (9 by maintainers)
Top Results From Across the Web
Can't install Cookiecutter please?
This is caused by failure of command git clone . A workaround: You can go to ithub.com:Dekalabs/cookiecutter-backend.git , download the ...
Read more >Use CookieCutter templates with Python - Visual Studio ...
Cookiecutter templates are cloned under a single folder ... After the template is installed locally, Cookiecutter displays an options page ...
Read more >Installation — cookiecutter 2.3.0 documentation - Read the Docs
First, read History in detail. There are a lot of major changes. The big ones are: Cookiecutter no longer deletes the cloned repo...
Read more >cookiecutter 1.1.0
A command-line utility that creates projects from project templates, e.g. creating a Python package project from a Python package project template.
Read more >How to write a Cookiecutter template - Cortex
In this how-to, we'll go through building your own simple Cookiecutter project template to get comfortable with the syntax. From this, you can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Indeed, my Anaconda installation made its Python the default (I used Chocolatey, which by default registers anaconda python as default python3). When I uninstalled Anaconda and installed with Chocolatey again but specifying not to register the default python, the cookiecutter was successfully installed and everything seems to work now.
Thanks for your help.
That should be easy to check - if you go to the folder @huguesv mentioned above and find
bin\python.exe
then it’s been created from Anaconda. We shouldn’t do this, since they do some things “differently” that may be problematic.I believe we actually look for the latest version of Python available, so if you selected the option in the Anaconda installer to make it the default it’s now claiming to be a regular Python install and there’s nothing we can do about it. As a workaround, you should be able to run these commands from a command prompt:
This is essentially what our tool should be doing. Unfortunately, if Anaconda has overwritten the CPython registry keys, we don’t have any way to do it automatically.