ここでは Python の実行環境に Django REST Framework をインストールします.まず,Django のインストールがされていなければ Django をインストールします.
(base) C:\Users\rinsaka>pip install Django ⏎
Collecting Django
Downloading Django-4.2.7-py3-none-any.whl (8.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.0/8.0 MB 10.9 MB/s eta 0:00:00
Collecting asgiref<4,>=3.6.0
Downloading asgiref-3.7.2-py3-none-any.whl (24 kB)
Collecting sqlparse>=0.3.1
Downloading sqlparse-0.4.4-py3-none-any.whl (41 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.2/41.2 kB 1.9 MB/s eta 0:00:00
Collecting tzdata
Downloading tzdata-2023.3-py2.py3-none-any.whl (341 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 341.8/341.8 kB 20.7 MB/s eta 0:00:00
Requirement already satisfied: typing-extensions>=4 in c:\users\rinsaka\anaconda3\lib\site-packages (from asgiref<4,>=3.6.0->Django) (4.4.0)
Installing collected packages: tzdata, sqlparse, asgiref, Django
Successfully installed Django-4.2.7 asgiref-3.7.2 sqlparse-0.4.4 tzdata-2023.3
(base) C:\Users\rinsaka>
続いて,Django REST Framework をインストールします.
(base) C:\Users\rinsaka>pip install djangorestframework ⏎
Collecting djangorestframework
Downloading djangorestframework-3.14.0-py3-none-any.whl (1.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 8.4 MB/s eta 0:00:00
Requirement already satisfied: django>=3.0 in c:\users\rinsaka\anaconda3\lib\site-packages (from djangorestframework) (4.2.7)
Requirement already satisfied: pytz in c:\users\rinsaka\anaconda3\lib\site-packages (from djangorestframework) (2022.7)
Requirement already satisfied: tzdata in c:\users\rinsaka\anaconda3\lib\site-packages (from django>=3.0->djangorestframework) (2023.3)
Requirement already satisfied: sqlparse>=0.3.1 in c:\users\rinsaka\anaconda3\lib\site-packages (from django>=3.0->djangorestframework) (0.4.4)
Requirement already satisfied: asgiref<4,>=3.6.0 in c:\users\rinsaka\anaconda3\lib\site-packages (from django>=3.0->djangorestframework) (3.7.2)
Requirement already satisfied: typing-extensions>=4 in c:\users\rinsaka\anaconda3\lib\site-packages (from asgiref<4,>=3.6.0->django>=3.0->djangorestframework) (4.4.0)
Installing collected packages: djangorestframework
Successfully installed djangorestframework-3.14.0
(base) C:\Users\rinsaka>
必須ではありませんが http
コマンドが利用できるように httpie をインストールしておくと良いでしょう.
(base) C:\Users\rinsaka>pip install httpie ⏎
Collecting httpie
Downloading httpie-3.2.2-py3-none-any.whl (127 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 127.4/127.4 kB 1.9 MB/s eta 0:00:00
Requirement already satisfied: defusedxml>=0.6.0 in c:\users\rinsaka\anaconda3\lib\site-packages (from httpie) (0.7.1)
Requirement already satisfied: requests[socks]>=2.22.0 in c:\users\rinsaka\anaconda3\lib\site-packages (from httpie) (2.28.1)
Requirement already satisfied: Pygments>=2.5.2 in c:\users\rinsaka\anaconda3\lib\site-packages (from httpie) (2.11.2)
Collecting rich>=9.10.0
Downloading rich-13.7.0-py3-none-any.whl (240 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 240.6/240.6 kB 7.4 MB/s eta 0:00:00
Requirement already satisfied: charset-normalizer>=2.0.0 in c:\users\rinsaka\anaconda3\lib\site-packages (from httpie) (2.0.4)
Requirement already satisfied: colorama>=0.2.4 in c:\users\rinsaka\anaconda3\lib\site-packages (from httpie) (0.4.6)
Collecting multidict>=4.7.0
Downloading multidict-6.0.4-cp310-cp310-win_amd64.whl (28 kB)
Collecting requests-toolbelt>=0.9.1
Downloading requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.5/54.5 kB ? eta 0:00:00
Requirement already satisfied: pip in c:\users\rinsaka\anaconda3\lib\site-packages (from httpie) (22.3.1)
Requirement already satisfied: setuptools in c:\users\rinsaka\anaconda3\lib\site-packages (from httpie) (65.6.3)
Requirement already satisfied: idna<4,>=2.5 in c:\users\rinsaka\anaconda3\lib\site-packages (from requests[socks]>=2.22.0->httpie) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\rinsaka\anaconda3\lib\site-packages (from requests[socks]>=2.22.0->httpie) (2022.12.7)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\rinsaka\anaconda3\lib\site-packages (from requests[socks]>=2.22.0->httpie) (1.26.14)
Requirement already satisfied: PySocks!=1.5.7,>=1.5.6 in c:\users\rinsaka\anaconda3\lib\site-packages (from requests[socks]>=2.22.0->httpie) (1.7.1)
Collecting markdown-it-py>=2.2.0
Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 87.5/87.5 kB 4.8 MB/s eta 0:00:00
Collecting Pygments>=2.5.2
Downloading pygments-2.17.2-py3-none-any.whl (1.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 7.5 MB/s eta 0:00:00
Collecting mdurl~=0.1
Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Installing collected packages: Pygments, multidict, mdurl, requests-toolbelt, markdown-it-py, rich, httpie
Attempting uninstall: Pygments
Found existing installation: Pygments 2.11.2
Uninstalling Pygments-2.11.2:
Successfully uninstalled Pygments-2.11.2
Successfully installed Pygments-2.17.2 httpie-3.2.2 markdown-it-py-3.0.0 mdurl-0.1.2 multidict-6.0.4 requests-toolbelt-1.0.0 rich-13.7.0
(base) C:\Users\rinsaka>