Django 3.0 was officially released on December 2, 2019. Python support is now 3.6, 3.7, 3.8, and it seems that there have been various updates. So I'll try to touch it, but before that, I'd like to write about the installation procedure.
I tried to install Python 3.7 because it was a big deal, but I had a harder time than I expected, so as a memorandum. .. ..
Install Python anyway. The environment is CentOS7, a server that only has yum update.
First, install the small items required for Python installation.
server
[root@django ~]# yum install gcc zlib-devel libffi-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel libuuid-devel xz-devel
python3.6 can be installed with yum, but as of now (December 10, 2019) 3.7 seems not to be in the repository, so you need to drop the package and install it.
server
[root@django ~]# curl -O https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
[root@django ~]tar xf Python-3.7.3.tgz
[root@django ~]cd Python-3.7.3
[root@django Python-3.7.3]./configure
[root@django Python-3.7.3]make
[root@django Python-3.7.3]make altinstall
After installation, add the execution PATH.
server
[root@django Python-3.7.3]visudo
・ ・ ・ ・
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
・ ・ ・ ・
##Last:/usr/local/bin is added
This should complete the settings, so check the version.
server
[root@django ~]python3 -V
-bash: python3:Command not found
F〇〇K With Python 3.6, it should have been possible by default, but with the installation form like this one, it seems that you have to play with it yourself. Set the symbolic link to start with python3.
server
[root@django Python-3.7.3]# which python3.7
/usr/local/bin/python3.7
[root@django Python-3.7.3]# ln -s /usr/local/bin/python3.7 /usr/bin/python3
[root@django Python-3.7.3]# python3 --version
Python 3.7.3
yeah
Also, let's check the version of pip.
server
[root@django ~]pip3 -V
-bash: pip3:Command not found
[root@django ~]pip -V
-bash: pip:Command not found
Jesus Christ You too ... I will investigate and put it in manually.
server
[root@django ~]curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
[root@django ~]python3 get-pip,py
[root@django ~]pip3 -V
pip 19.3.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
This time, we took measures like ↑, but it seems that you can just change the settings. Introducing Python 3.7 to CentOS / RHEL 7 now.
Finally, install Django 3.0.
server
[root@django ~]pip3 install Django
・ ・ ・
Successfully installed Django-3.0 asgiref-3.2.3 pytz-2019.3 sqlparse-0.3.0
[root@django ~]
** Okemaru ** I was able to install it successfully.
Since the supported version of python has changed, it took longer than I expected to install 3.7, which I had never installed. Perhaps 3.8 will have a similar response. In the next article, I'll try out Django 3.0.
Recommended Posts