I’m sure this is pretty straightforward to someone experienced. I’m learning Django through the Wedge of Django ebook.
I’m using Python 3.8.7 installed via pyenv like so:
pyenv install 3.8.7
Then I’ve set up a virtualenv like so:
pyenv virtualenv 3.8.7 everycheese
I activate the virtualenv in my repo like so:
pyenv local everycheese
The environment is shown as active in the prompt, as it starts with (everycheese).
The main project is cloned from Django Cookiecutter https://github.com/cookiecutter/cookiecutter-django
I’ve then used pip to install requirements from the requirements.txt files.
However - I’m running into trouble when I try to add new packages (by adding the package to requirements.txt as a new line and installing again with pip).
pip list
, or pip freeze
both show the new module. But when I add the module to my INSTALLED_APPS and try to import it in my models.py file, Django cannot find it.
When I type
which python
, and which pip
, they point to different directories and I think this may be part of the problem but I am stuck.