An experience with the quick installation of flask under Windows

Source: Internet
Author: User

Premise:

1. The Python version is installed (typically 2. X

2. Easy_install installed

Python installation, remember to configure the environment variables for Python, for example: I add G:\Python directly to the path

Verify installation python succeeded: cmd input python or python-v

--------------------------------------------------------------------------------------------------------------- ------------------------------------

This is the website of download Easy_install
: Http://pypi.python.org/pypi/setuptools can find the correct version to download.

Win7 32-bit can download setuptools-0.6c11.win32-py2.7.exe.

The Win7 64-bit must be installed using ez_setup.py.

The following is a download of my 64-bit

I have this:

Https://pypi.python.org/packages/ba/2c/743df41bd6b3298706dfe91b0c7ecdc47f2dc1a3104abeb6e9aa4a45fa5d/ez_setup-0.9.tar.gz

Download ez_setup.py after decompression, under CMD into the path just extracted, execute Python ez_setup.py, can be installed automatically.


After installing Easy_install, add the directory where the Easy_install is located in the path of the system environment variable, for example: G:\Python\Scripts

  1. Enter Easy_install virtualenv in cmd, install virtualenv, this is mainly used to do the interpreter environment isolation
  2. Select a disk to configure the virtual environment, such as D-Drive
  3. CMD into D-Disk, execute: virtualenv myvir, get myvir Virtual Environment file directory in D disk
  4. Then CD to the Myvir directory under scripts, enter Activate.bat

  5. Then enter Easy_install Flask
  6. Test: hello.py saved in D:\myvir\Scripts

  7.  from  flask import   Flask app  =flask (__name__   ) @app. Route (  " / "  )  def   Hello_world ():  return   
          hello World   " if  __name__  = =  "  __main__   " : App.run ()  

  8. Execute Python hello.py

  9. Open URL http://127.0.0.1:5000, install flask successfully

An experience with the quick installation of flask under Windows

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.