flask

yum install centos-release-scl
Loaded plugins: fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
 * base: mirrors.praction.in
 * epel: ftp.jaist.ac.jp
 * extras: mirrors.praction.in
 * updates: mirrors.praction.in
Resolving Dependencies
--> Running transaction check
---> Package centos-release-scl.noarch 0:2-3.el7.centos will be installed
--> Processing Dependency: centos-release-scl-rh for package: centos-release-scl-2-3.el7.centos.noarch
--> Running transaction check
---> Package centos-release-scl-rh.noarch 0:2-3.el7.centos will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                    Arch        Version               Repository   Size
================================================================================
Installing:
 centos-release-scl         noarch      2-3.el7.centos        extras       12 k
Installing for dependencies:
 centos-release-scl-rh      noarch      2-3.el7.centos        extras       12 k

Transaction Summary
================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 24 k
Installed size: 39 k
Is this ok [y/d/N]: y
Downloading packages:
(1/2): centos-release-scl-rh-2-3.el7.centos.noarch.rpm     |  12 kB   00:00   
(2/2): centos-release-scl-2-3.el7.centos.noarch.rpm        |  12 kB   00:00   
--------------------------------------------------------------------------------
Total                                               70 kB/s |  24 kB  00:00   
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : centos-release-scl-rh-2-3.el7.centos.noarch                  1/2
  Installing : centos-release-scl-2-3.el7.centos.noarch                     2/2
  Verifying  : centos-release-scl-2-3.el7.centos.noarch                     1/2
  Verifying  : centos-release-scl-rh-2-3.el7.centos.noarch                  2/2

Installed:
  centos-release-scl.noarch 0:2-3.el7.centos                                   

Dependency Installed:
  centos-release-scl-rh.noarch 0:2-3.el7.centos                               

Complete!
  yum install rh-python36
Loaded plugins: fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
 * base: mirrors.praction.in
 * centos-sclo-rh: mirrors.praction.in
 * centos-sclo-sclo: mirrors.praction.in
 * epel: repos.del.extreme-ix.org
 * extras: mirrors.praction.in
 * updates: mirrors.praction.in
centos-sclo-rh                                           | 3.0 kB     00:00   
centos-sclo-sclo                                         | 2.9 kB     00:00   
(1/2): centos-sclo-sclo/x86_64/primary_db                  | 322 kB   00:00   
(2/2): centos-sclo-rh/x86_64/primary_db                    | 4.0 MB   00:03   
Resolving Dependencies
--> Running transaction check
---> Package rh-python36.x86_64 0:2.0-1.el7 will be installed
--> Processing Dependency: rh-python36-runtime for package: rh-python36-2.0-1.el7.x86_64
--> Processing Dependency: rh-python36-python-virtualenv for package: rh-python36-2.0-1.el7.x86_64
--> Processing Dependency: rh-python36-python-setuptools for package: rh-python36-2.0-1.el7.x86_64
--> Processing Dependency: rh-python36-python-pip for package: rh-python36-2.0-1.el7.x86_64
--> Processing Dependency: rh-python36-python for package: rh-python36-2.0-1.el7.x86_64
--> Running transaction check
---> Package rh-python36-python.x86_64 0:3.6.3-7.el7 will be installed
--> Processing Dependency: rh-python36-python-libs(x86-64) = 3.6.3-7.el7 for package: rh-python36-python-3.6.3-7.el7.x86_64
--> Processing Dependency: libpython3.6m.so.rh-python36-1.0()(64bit) for package: rh-python36-python-3.6.3-7.el7.x86_64
---> Package rh-python36-python-pip.noarch 0:9.0.1-2.el7 will be installed
---> Package rh-python36-python-setuptools.noarch 0:36.5.0-1.el7 will be installed
---> Package rh-python36-python-virtualenv.noarch 0:15.1.0-2.el7 will be installed
--> Processing Dependency: rh-python36-python-devel for package: rh-python36-python-virtualenv-15.1.0-2.el7.noarch
---> Package rh-python36-runtime.x86_64 0:2.0-1.el7 will be installed
--> Running transaction check
---> Package rh-python36-python-devel.x86_64 0:3.6.3-7.el7 will be installed
--> Processing Dependency: scl-utils-build for package: rh-python36-python-devel-3.6.3-7.el7.x86_64
---> Package rh-python36-python-libs.x86_64 0:3.6.3-7.el7 will be installed
--> Running transaction check
---> Package scl-utils-build.x86_64 0:20130529-19.el7 will be installed
--> Processing Dependency: redhat-rpm-config for package: scl-utils-build-20130529-19.el7.x86_64
--> Running transaction check
---> Package redhat-rpm-config.noarch 0:9.1.0-88.el7.centos will be installed
--> Processing Dependency: dwz >= 0.4 for package: redhat-rpm-config-9.1.0-88.el7.centos.noarch
--> Processing Dependency: perl-srpm-macros for package: redhat-rpm-config-9.1.0-88.el7.centos.noarch
--> Running transaction check
---> Package dwz.x86_64 0:0.11-3.el7 will be installed
---> Package perl-srpm-macros.noarch 0:1-8.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                       Arch   Version              Repository      Size
================================================================================
Installing:
 rh-python36                   x86_64 2.0-1.el7            centos-sclo-rh 2.7 k
Installing for dependencies:
 dwz                           x86_64 0.11-3.el7           base            99 k
 perl-srpm-macros              noarch 1-8.el7              base           4.6 k
 redhat-rpm-config             noarch 9.1.0-88.el7.centos  base            81 k
 rh-python36-python            x86_64 3.6.3-7.el7          centos-sclo-rh  55 k
 rh-python36-python-devel      x86_64 3.6.3-7.el7          centos-sclo-rh 841 k
 rh-python36-python-libs       x86_64 3.6.3-7.el7          centos-sclo-rh 7.5 M
 rh-python36-python-pip        noarch 9.0.1-2.el7          centos-sclo-rh 1.7 M
 rh-python36-python-setuptools noarch 36.5.0-1.el7         centos-sclo-rh 566 k
 rh-python36-python-virtualenv noarch 15.1.0-2.el7         centos-sclo-rh 1.8 M
 rh-python36-runtime           x86_64 2.0-1.el7            centos-sclo-rh 1.1 M
 scl-utils-build               x86_64 20130529-19.el7      base            18 k

Transaction Summary
================================================================================
Install  1 Package (+11 Dependent packages)

Total download size: 14 M
Installed size: 55 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/centos-sclo-rh/packages/rh-python36-2.0-1.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f2ee9d55: NOKEY
Public key for rh-python36-2.0-1.el7.x86_64.rpm is not installed
(1/12): rh-python36-2.0-1.el7.x86_64.rpm                   | 2.7 kB   00:00   
(2/12): perl-srpm-macros-1-8.el7.noarch.rpm                | 4.6 kB   00:00   
(3/12): dwz-0.11-3.el7.x86_64.rpm                          |  99 kB   00:00   
(4/12): rh-python36-python-3.6.3-7.el7.x86_64.rpm          |  55 kB   00:00   
(5/12): rh-python36-python-setuptools-36.5.0-1.el7.noarch. | 566 kB   00:00   
(6/12): rh-python36-python-devel-3.6.3-7.el7.x86_64.rpm    | 841 kB   00:00   
(7/12): redhat-rpm-config-9.1.0-88.el7.centos.noarch.rpm   |  81 kB   00:01   
(8/12): rh-python36-runtime-2.0-1.el7.x86_64.rpm           | 1.1 MB   00:00   
(9/12): scl-utils-build-20130529-19.el7.x86_64.rpm         |  18 kB   00:00   
(10/12): rh-python36-python-virtualenv-15.1.0-2.el7.noarch | 1.8 MB   00:01   
(11/12): rh-python36-python-libs-3.6.3-7.el7.x86_64.rpm    | 7.5 MB   00:08   
rh-python36-python-pip-9.0.1-2 FAILED                                         
http://centos-hcm.viettelidc.com.vn/7.7.1908/sclo/x86_64/rh/rh-python36/rh-python36-python-pip-9.0.1-2.el7.noarch.rpm: [Errno 12] Timeout on http://centos-hcm.viettelidc.com.vn/7.7.1908/sclo/x86_64/rh/rh-python36/rh-python36-python-pip-9.0.1-2.el7.noarch.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
(12/12): rh-python36-python-pip-9.0.1-2.el7.noarch.rpm     | 1.7 MB   00:03   
--------------------------------------------------------------------------------
Total                                              177 kB/s |  14 MB  01:20   
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
Importing GPG key 0xF2EE9D55:
 Userid     : "CentOS SoftwareCollections SIG (https://wiki.centos.org/SpecialInterestGroup/SCLo) <security@centos.org>"
 Fingerprint: c4db d535 b1fb ba14 f8ba 64a8 4eb8 4e71 f2ee 9d55
 Package    : centos-release-scl-rh-2-3.el7.centos.noarch (@extras)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : rh-python36-runtime-2.0-1.el7.x86_64                        1/12
  Installing : rh-python36-python-libs-3.6.3-7.el7.x86_64                  2/12
  Installing : rh-python36-python-3.6.3-7.el7.x86_64                       3/12
  Installing : rh-python36-python-setuptools-36.5.0-1.el7.noarch           4/12
  Installing : rh-python36-python-pip-9.0.1-2.el7.noarch                   5/12
  Installing : perl-srpm-macros-1-8.el7.noarch                             6/12
  Installing : dwz-0.11-3.el7.x86_64                                       7/12
  Installing : redhat-rpm-config-9.1.0-88.el7.centos.noarch                8/12
  Installing : scl-utils-build-20130529-19.el7.x86_64                      9/12
  Installing : rh-python36-python-devel-3.6.3-7.el7.x86_64                10/12
  Installing : rh-python36-python-virtualenv-15.1.0-2.el7.noarch          11/12
  Installing : rh-python36-2.0-1.el7.x86_64                               12/12
  Verifying  : rh-python36-runtime-2.0-1.el7.x86_64                        1/12
  Verifying  : rh-python36-python-libs-3.6.3-7.el7.x86_64                  2/12
  Verifying  : rh-python36-python-3.6.3-7.el7.x86_64                       3/12
  Verifying  : dwz-0.11-3.el7.x86_64                                       4/12
  Verifying  : rh-python36-python-virtualenv-15.1.0-2.el7.noarch           5/12
  Verifying  : perl-srpm-macros-1-8.el7.noarch                             6/12
  Verifying  : rh-python36-2.0-1.el7.x86_64                                7/12
  Verifying  : rh-python36-python-devel-3.6.3-7.el7.x86_64                 8/12
  Verifying  : rh-python36-python-pip-9.0.1-2.el7.noarch                   9/12
  Verifying  : redhat-rpm-config-9.1.0-88.el7.centos.noarch               10/12
  Verifying  : rh-python36-python-setuptools-36.5.0-1.el7.noarch          11/12
  Verifying  : scl-utils-build-20130529-19.el7.x86_64                     12/12

Installed:
  rh-python36.x86_64 0:2.0-1.el7                                               

Dependency Installed:
  dwz.x86_64 0:0.11-3.el7                                                     
  perl-srpm-macros.noarch 0:1-8.el7                                           
  redhat-rpm-config.noarch 0:9.1.0-88.el7.centos                               
  rh-python36-python.x86_64 0:3.6.3-7.el7                                     
  rh-python36-python-devel.x86_64 0:3.6.3-7.el7                               
  rh-python36-python-libs.x86_64 0:3.6.3-7.el7                                 
  rh-python36-python-pip.noarch 0:9.0.1-2.el7                                 
  rh-python36-python-setuptools.noarch 0:36.5.0-1.el7                         
  rh-python36-python-virtualenv.noarch 0:15.1.0-2.el7                         
  rh-python36-runtime.x86_64 0:2.0-1.el7                                       
  scl-utils-build.x86_64 0:20130529-19.el7                                     

Complete!

root@localhost ~]# scl enable rh-python36 bash
ABRT has detected 1 problem(s). For more info run: abrt-cli list --since 1574600731
[root@worker1 ~]# mkdir my_flask_app
[root@worker1 ~]# cd my_flask_app
[root@worker1 my_flask_app]# python3 -m venv venv
[root@worker1 my_flask_app]# source venv/bin/activate
(venv) [root@worker1 my_flask_app]# pip install Flask
Collecting Flask
  Downloading https://files.pythonhosted.org/packages/9b/93/628509b8d5dc749656a9641f4caf13540e2cdec85276964ff8f43bbb1d3b/Flask-1.1.1-py2.py3-none-any.whl (94kB)
    100% |████████████████████████████████| 102kB 1.4MB/s 
Collecting Jinja2>=2.10.1 (from Flask)
  Downloading https://files.pythonhosted.org/packages/65/e0/eb35e762802015cab1ccee04e8a277b03f1d8e53da3ec3106882ec42558b/Jinja2-2.10.3-py2.py3-none-any.whl (125kB)
    100% |████████████████████████████████| 133kB 2.0MB/s 
Collecting itsdangerous>=0.24 (from Flask)
  Downloading https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl
Collecting Werkzeug>=0.15 (from Flask)
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/ce/42/3aeda98f96e85fd26180534d36570e4d18108d62ae36f87694b476b83d6f/Werkzeug-0.16.0-py2.py3-none-any.whl (327kB)
    100% |████████████████████████████████| 327kB 759kB/s 
Collecting click>=5.1 (from Flask)
  Downloading https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl (81kB)
    100% |████████████████████████████████| 81kB 975kB/s 
Collecting MarkupSafe>=0.23 (from Jinja2>=2.10.1->Flask)
  Downloading https://files.pythonhosted.org/packages/b2/5f/23e0023be6bb885d00ffbefad2942bc51a620328ee910f64abe5a8d18dd1/MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
Installing collected packages: MarkupSafe, Jinja2, itsdangerous, Werkzeug, click, Flask
Successfully installed Flask-1.1.1 Jinja2-2.10.3 MarkupSafe-1.1.1 Werkzeug-0.16.0 click-7.0 itsdangerous-1.1.0
You are using pip version 9.0.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(venv) [root@worker1 my_flask_app]# 

(venv) [root@worker1 my_flask_app]# vi hello.py
[root@worker1 my_flask_app]# cat hello.py 
from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
    return 'Hello World!'

(venv) [root@worker1 my_flask_app]# export FLASK_APP=hello
(venv) [root@worker1 my_flask_app]# flask run
 * Serving Flask app "hello"
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

Comments

Popular posts from this blog

ansible redhat cluster qorum qdevice

PE 3.9.0 on centos 6

gfs2 cluster