What is a dog? Django installation volume

Create a Python virtual environment

Hello! This is Ponta, a Shiba Inu. I'm getting used to the Mac gradually. I'm trying to install Django today, but when I tried to do it suddenly, the owner scolded me. First, create a virtual environment for Python. It's unreasonable because the text procedure that the owner skipped cleaning up didn't mention the virtual environment.

Ponta@dog # python -m venv venv_dog

You now have a virtual environment. venv is a magic trick for creating a virtual environment, the second is the directory of the virtual environment. Let's see what happens to the directories in the virtual environment.

Ponta@dog # tree -L 3
.
└── venv_dog
    ├── bin
    │   ├── Activate.ps1
    │   ├── activate
    │   ├── activate.csh
    │   ├── activate.fish
    │   ├── easy_install
    │   ├── easy_install-3.8
    │   ├── pip
    │   ├── pip3
    │   ├── pip3.8
    │   ├── python -> /Library/Frameworks/Python.framework/Versions/3.8/bin/python
    │   └── python3 -> python
    ├── include
    ├── lib
    │   └── python3.8
    └── pyvenv.cfg

5 directories, 12 files

Now it's time to enter the Python virtual environment!

Ponta@dog # cd venv_dog/bin 
Ponta@bin # source activate
(venv_dog) Ponta@bin # 

Oh, the command line has changed! Owner!

(venv_dog) Ponta@bin # python -V
Python 3.8.5
(venv_dog) Ponta@bin # 

One that worked!

Install Django

Finally, the owner told me to install Django. Install with pip.

(venv_dog) Ponta@bin # pip install django
Collecting django
  Downloading Django-3.1-py3-none-any.whl (7.8 MB)
     |████████████████████████████████| 7.8 MB 3.9 MB/s 
Collecting pytz
  Using cached pytz-2020.1-py2.py3-none-any.whl (510 kB)
Collecting sqlparse>=0.2.2
  Using cached sqlparse-0.3.1-py2.py3-none-any.whl (40 kB)
Collecting asgiref~=3.2.10
  Using cached asgiref-3.2.10-py3-none-any.whl (19 kB)
Installing collected packages: pytz, sqlparse, asgiref, django
Successfully installed asgiref-3.2.10 django-3.1 pytz-2020.1 sqlparse-0.3.1
(venv_dog) Ponta@bin # 

It seems to have worked, but I'll check it with pip just in case.

(venv_dog) Ponta@bin # pip list
Package    Version
---------- -------
asgiref    3.2.10
Django     3.1
pip        20.2.2
pytz       2020.1
setuptools 47.1.0
sqlparse   0.3.1
(venv_dog) Ponta@bin # 

It looks like you're in Django! The version is 3.1. You can also check the version by the following method.

(venv_dog) Ponta@bin # python -m django --version
3.1
(venv_dog) Ponta@bin #

That's it. See ya! Bye bye!

Recommended Posts

What is a dog? Django installation volume
What is a dog? Python installation volume
What is a dog? Challenge Django templates! Volume
What is a dog? POST Sending Volume Using Django--forms.py
What is a dog? Django App Creation Start Volume--startapp
What is a dog? Django App Creation Start Volume--startproject
What is Django? .. ..
What is a dog? Volume of GET request and query parameters
What is a dog? Django--Get Name and Date from URL Volume
What is a distribution?
What is a terminal?
What is a hacker?
What is a pointer?
What is a dog? Django--Create a custom user model
What is a dog? Django--Create a custom user model 2
What is a decision tree?
What is a Context Switch?
What is a super user?
What is a system call
[Definition] What is a framework?
What is a callback function?
What is a python map?
To myself as a Django beginner (2) --What is MTV?
[Python] What is a zip function?
[Python] What is a with statement?
What is a lexical scope / dynamic scope?
What is a Convolutional Neural Network?
What is a dog? Django--Getting Started with Form for the First Time POST Transmission Volume
Django installation
What is copy.copy ()
What is dotenv?
What is POSIX?
What is Linux
What is klass?
What is SALOME?
What is Linux?
What is python
What is hyperopt?
It's a Mac. What is the Linux command Linux?
What is Linux
django installation location
What is pyvenv
What is __call__
What is Linux
Tell me what a conformal map is, Python!
What is Python
What is a dog? Django--Volume of using values obtained from URLs in class-based views
What I did when I stumbled on a Django tutorial
Basics of Python learning ~ What is a string literal? ~
What is a recommend engine? Summary of the types
What is God? Make a simple chatbot with python
What is Piotroski's F-Score?
What is Raspberry Pi?
[Python] What is Pipeline ...
What is Calmar Ratio?
[PyTorch Tutorial ①] What is PyTorch?
What is hyperparameter tuning?
What is JSON? .. [Note]
What is Linux for?
What is ensemble learning?
What is TCP / IP?