最新消息:20190717 VPS服务器:Vultr新加坡,WordPress主题:大前端D8,统一介绍入口:关于

[记录]CentOS服务器中为微信开发安装Flask服务器

CentOS crifan 450浏览 0评论

折腾:

[记录]折腾阿里云的CentOS服务器作为微信公众号的开发

期间,先去服务器中安装flask服务器

服务器是centos 6.8的:

[root@AY140128113754462e2eZ ~]# lsb_release -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 6.8 (Final)
Release:        6.8
Codename:       Final
[root@AY140128113754462e2eZ ~]#

Python是2.6.6的:

[root@AY140128113754462e2eZ ~]# python -V
Python 2.6.6

“flask项目需要python2.7以上的版本,所以我们需要在系统中安装python2.7或python3.5。”

centos install python flask

Installation — Flask Documentation (0.11)

先去弄清楚:

[研究]安装和使用Flask用Python 2还是Python 3

决定用Python 2

此处去CentOS中,安装和使用virtualenv:

[记录]CentOS中安装和使用virtualenv

和:

[记录]CentOS中安装和使用virtualenvwrapper

然后继续安装Flask:

(SIPEvents)  SIPEvents pip install flask
Collecting flask
  Downloading Flask-0.11.1-py2.py3-none-any.whl (80kB)
    100% || 81kB 13kB/s 
Collecting itsdangerous>=0.21 (from flask)
  Downloading itsdangerous-0.24.tar.gz (46kB)
    100% || 51kB 18kB/s 
Collecting Jinja2>=2.4 (from flask)
  Downloading Jinja2-2.8-py2.py3-none-any.whl (263kB)
    100% || 266kB 15kB/s 
Collecting Werkzeug>=0.7 (from flask)
  Downloading Werkzeug-0.11.10-py2.py3-none-any.whl (306kB)
    100% || 307kB 15kB/s 
Collecting click>=2.0 (from flask)
  Downloading click-6.6.tar.gz (283kB)
    100% || 286kB 23kB/s 
Collecting MarkupSafe (from Jinja2>=2.4->flask)
  Downloading MarkupSafe-0.23.tar.gz
Building wheels for collected packages: itsdangerous, click, MarkupSafe
  Running setup.py bdist_wheel for itsdangerous … done
  Stored in directory: /root/.cache/pip/wheels/fc/a8/66/24d655233c757e178d45dea2de22a04c6d92766abfb741129a
  Running setup.py bdist_wheel for click … done
  Stored in directory: /root/.cache/pip/wheels/b0/6d/8c/cf5ca1146e48bc7914748bfb1dbf3a40a440b8b4f4f0d952dd
  Running setup.py bdist_wheel for MarkupSafe … done
  Stored in directory: /root/.cache/pip/wheels/a3/fa/dc/0198eed9ad95489b8a4f45d14dd5d2aee3f8984e46862c5748
Successfully built itsdangerous click MarkupSafe
Installing collected packages: itsdangerous, MarkupSafe, Jinja2, Werkzeug, click, flask
Successfully installed Jinja2-2.8 MarkupSafe-0.23 Werkzeug-0.11.10 click-6.6 flask-0.11.1 itsdangerous-0.24
(SIPEvents)  SIPEvents

注意此时是处于virtualenvwrapper中

转载请注明:在路上 » [记录]CentOS服务器中为微信开发安装Flask服务器

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
59 queries in 0.128 seconds, using 18.87MB memory