Cant use the coockiecutter command after pip install windows

Question:

I went on the cmdl and pip install cookiecutter

This worked fine because when i do

pip show -f cookiecutter

I have the information of where it was saved(i.e: c:usersnameappdataroamingpythonpython39site-packages

But when I try to run the following command in the folder I want my template to be created in

cookiecutter -c v1 https://github.com/drivendata/cookiecutter-data-science 

This error message is displayed:

‘cookiecutter’ is not recognized as an internal or external command,
operable program or batch file.

After reviewing countless other similar posts, I think this might have to do with the virtual environment or path that is active but I have no idea what that means and how to make changes in my system.

Asked By: Roger Steinberg

||

Answers:

To use cookiecutter, type "python" in the Windows search bar. Your current python version should show up. In the window that pops-up, click "open file location". Right click the python shortcut icon and click "open file location" again. Look for the "Scripts" folder and double click it. If you installed cookiecutter correctly, you should see it in the "Scripts" folder.

Copy the file path and open up "System Properties". In "System Properties", click on "Environment Variables", then open up "PATH" and add the link you just copied to path. Click "OK" to all and restart the command prompt. Using the command prompt, go to the folder where you want to set up the project in your local system and run the following:

cookiecutter -c v1 https://github.com/drivendata/cookiecutter-data-science

If it works, it should ask you for project name, author name etc.

Answered By: pythondance
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.