I'm practicing Python. I built a virtual environment in the tutorial, so it's a memorandum.
By building a virtual environment for each project, Python can be executed within a limited range, and unnecessary interference between frameworks and libraries can be avoided.
I feel like I'm referring to some Django learning sites Building a virtual environment seems to be essential, so I'll do it.
First, create a folder on your desktop (named [django_girls] this time).
$ cd djangogirls
Go to the folder with
$ python3 -m venv myvenv
Create a virtual environment with.
For now, this will create a folder named [myvenv] that contains the virtual environment (a series of defolders and files).
At the console
$ source myvenv/bin/activate
To start the virtual environment.
If the boot completes successfully, the console will display `` `(myvenv) ``` at the beginning of the prompt.
pip is pre-installed if it is Python 3.4 or higher (2.7.9 or higher for Python 2), so you can use it immediately. (Reference)
So this time (using 3 series) is a pass.
Then follow the tutorial instructions to create a file called [requirements.txt] → text (Django ~ = 2.2.4 Fill in
) → Execute`` pip install -r requirements.txt ``
And install Django.
According to the instructions in the tutorial, the version was "2.2.4", which was not the latest version, so I changed the text to be entered to Django ~ = 3.0.3
and executed it to install the latest version.
What version of django you are using
$ python -m django --version
Can be confirmed at. (Reference)
Continue from installing Git.
Below, the site referred to in this tutorial is here → (DjangoGirls)
Recommended Posts