0

I installed a cookie cutter using pip.

Then I ran this $ cookiecutter

But this doesn't work.

This is the traceback:

 Traceback (most recent call last):
 File "/home/choco/.local/bin/cookiecutter", line 7, in
 from cookiecutter.main import main
 ModuleNotFoundError: No module named 'cookiecutter'
Nazim Kerimbekov
  • 4,712
  • 8
  • 34
  • 58
  • what's your python version? Are you using virtual environment? Double check that cookiecutter is installed in your project python path by `pip freeze` – seuling Jul 03 '18 at 06:18
  • my python version is 3.6 and I'm using virtual enviroment –  Jul 03 '18 at 06:42

2 Answers2

0

The problem can be solved by using the following steps:

  • Move to the folder where the virtual environment is installed

  • started the virtual environment (Activate it)

  • Install the cookiecutter using Pip

The problem is installing the module outside the virtualenv.

Mufeed
  • 3,018
  • 4
  • 20
  • 29
  • This is the file path. Is there a problem here? ./.local/bin/cookiecutter ./.local/lib/python3.6/site-packages/cookiecutter –  Jul 03 '18 at 06:47
  • No. Your file name seems to cause problem. can you change your file name to something else and run? – Mufeed Jul 03 '18 at 06:48
  • Because your file name and module names are same. – Mufeed Jul 03 '18 at 06:50
  • I have never created a file named cookiecutter Does it mean to rename cookiecutter module? –  Jul 03 '18 at 06:53
  • No. I guess I have mistaken. Pardon. – Mufeed Jul 03 '18 at 06:54
  • That means you haven't installed it. just try "pip install cookiecutter" – Mufeed Jul 03 '18 at 06:59
  • ah I run it into a virtual environment and it did not respond –  Jul 03 '18 at 07:00
  • Name: cookiecutter Version: 1.6.0 Summary: A command-line utility that creates projects from project templates, e.g. creating a Python package project from a Python package project template. Home-page: https://github.com/audreyr/cookiecutter Author: Audrey Roy Author-email: audreyr@gmail.com License: BSD Location: /home/choco/.local/lib/python3.6/site-packages Requires: whichcraft, poyo, binaryornot, click, jinja2, future, requests, jinja2-time Required-by: –  Jul 03 '18 at 07:01
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/174214/discussion-between-mufeed-and-choco). – Mufeed Jul 03 '18 at 07:02
0

Is Anaconda installed in your development environment ?

If so, there may be problems between your two installations.

the command to install cookiecutter with conda is :

conda install -c conda-forge cookiecutter
Cédric Dromzée
  • 347
  • 4
  • 11