Resolves an issue where the latest flask version downloaded from PIP cannot run Flaskr and latest features

Source: Internet
Author: User

Because of the unit tests in the test flask. So prepare to get an environment, check the official documents found flask Source There is a example folder inside there is a FLASKR application to test

Look at the Readme document, which is roughly the case

                         /FLASKR/                 A minimal blog application    ~ What is Flaskr?      A SQLite powered thumble Blog Application    ~ How does I use it?      1. Edit the configuration in the flaskr.py file or         export an flaskr_settings environment variable         pointing to a CO Nfiguration file.      2. Initialize the database with this command:         flask--app=flaskr initdb      3. Now can run Flaskr:         flask-- App=flaskr Run the         application would greet you on         http://localhost:5000/    ~ it tested?      You betcha.  Run the ' test_flaskr.py ' file to see the      tests pass.

It's obviously some introduction, and then I'll show you how to use it.

Here you might try to do it directly

Flask--app=flaskr Initdb

However, there may be no OVA, and your CLI will tell you flask command not found. This pit I went to issue to search, and sure enough, some people have recently asked

Since this is the newest feature in flask the latest version 0.11.dev0 so the latest version of the direct use of PIP install flask is not able to run the environment variable is also not modified

So executing this command, there is no way to get the desired effect. Issue above someone gave a solution that basically installs the latest version directly from the code I tried it. It is possible to solve this problem by installing the latest code directly with PIP.


This sentence is directly using Pip install to pull the latest Master Master stable version above GitHub. Then try it again.

Finally with

Export

。。。 Again to be beaten face. Do not try to use Baidu to solve such problems. I can't find it in my life.

Look at the document to see English. Search the problem with Google. Amend.

Resolves an issue where the latest flask version downloaded from PIP cannot run Flaskr and latest features

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.