Djangoインストールできたよー

クイックインストールガイド | Django documentation | Django

nao@yukimori:~$ python
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

 

 pipを用いてPythonのフレームワークdjangoをインストール - Qiita

nao@yukimori:~$ sudo pip install --upgrade setuptools
The directory '/home/nao/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/nao/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting setuptools
Downloading setuptools-39.0.1-py2.py3-none-any.whl (569kB)
100% |████████████████████████████████| 573kB 1.5MB/s
Installing collected packages: setuptools
Found existing installation: setuptools 20.7.0
Uninstalling setuptools-20.7.0:
Successfully uninstalled setuptools-20.7.0
Successfully installed setuptools-39.0.1
You are using pip version 9.0.2, however version 9.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
nao@yukimori:~$ sudo pip install --upgrade pip
The directory '/home/nao/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/nao/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pip
Downloading pip-9.0.3-py2.py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 995kB/s
Installing collected packages: pip
Found existing installation: pip 9.0.2
Uninstalling pip-9.0.2:
Successfully uninstalled pip-9.0.2
Successfully installed pip-9.0.3

 

nao@yukimori:~$ sudo pip install django
The directory '/home/nao/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/nao/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting django
Downloading Django-1.11.11-py2.py3-none-any.whl (6.9MB)
100% |████████████████████████████████| 7.0MB 250kB/s
Requirement already satisfied: pytz in /usr/lib/python2.7/dist-packages (from django)
Installing collected packages: django
Successfully installed django-1.11.11

 

はじめての Django アプリ作成、その 1 | Django documentation | Django

nao@yukimori:~$ python -m django --version
1.11.11

 

nao@yukimori:~$ django-admin startproject mysite
nao@yukimori:~$ cd mysite
nao@yukimori:~/mysite$ python manage.py runserver
Performing system checks...

System check identified no issues (0 silenced).

You have 13 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.

April 01, 2018 - 04:23:38
Django version 1.11.11, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[01/Apr/2018 04:24:00] "GET / HTTP/1.1" 200 1716
Not Found: /favicon.ico
[01/Apr/2018 04:24:00] "GET /favicon.ico HTTP/1.1" 404 1962

 

f:id:takuwz:20180401134218p:plain