Documenting Working Codes: Must we pipenv-install django everytime we start a new project?

in #python4 years ago

It is like the answer to this question is not on the internet

Inability to answer this question has cost me 5 days

My current personal answer is yes.

Below adds to confirming my intuition:

Went to the directory containing an already started Django project I started with Django-admin using python 3.7 before switching to 3.9

Switching to 3.9 means that the Scripts folder in 3.9 neither contains Django-admin or pipenv.

It is like starting afresh.

Which is what I needed.

Upon typing pipenv into the command line, it returned ‘file not found in either internal or external’ blah

Translation: it does not exist.

Since, the python 3.9 Scripts folder I am currently using contains “pip3”, I ran “pip3 install pipenv” on the terminal

After installing, I ran “pipenv shell” in my project’s directory and it gave me this:

image.png

Meaning: successful

And it will be successful bc I installed pipenv in the Scripts folder using “pip3 install pipenv”

Then I tested out “Django-admin” and it gave me this:

image.png

Translation: It does not exist.

Then I pipenv-installed django which is DIFFERENT from pip-installing django. I believe.

Any way, I followed the routine below and it gave me this:

image.png

Then I re-tested the “Django-admin” and it gave me this:

image.png

Translation: it now exists

PS: it does not exist on the global scope of my computer. Only in the directory I pipenv-installed it. i.e. local scope. And it can only be used INSIDE THAT local scope.