Introduction:
In fact, before Python, just know that there is this language only. Most of them have been developed using. NET, but have also learned the mvc+ef development, but because of the work is completely useless, there is no blog record learning things.
Recently came into contact with the crawler technology, and then learned that the Python development crawler looks very powerful. Then came the interest, interest is an important thing, so began to slowly contact with Python.
And then from the most basic configuration of the development environment or something. Suddenly found that it is very convenient to do. NET, the development environment does not have to worry about, Windows system only need to install the Visual Studio and MSSQL Server can be developed.
Of course, it may not be as simple as I say. To get started, let's start with the most basic installation development tools and configuration development environment.
First step: Install development tools
Here I chose the JetBrains Pycharm IDE, an IDE developed specifically for Python by a jetbrains company.
Download address (JetBrains website):
After the download is complete, run the downloaded file, follow the instructions to install the step-by-step, the installation process is very simple, but I still record the steps I installed.
After you run the downloaded. exe file, the following interface appears and click Next directly.
Then choose the installation address again Next.
Then choose to create the desktop shortcut and create the association, of course, you can also default uncheck Direct Next. Random.
Then wait a few minutes and the installation is complete. Click Finish below to complete the installation.
How about the installation is not very simple. The next step is activation.
Run. The first time you open the following prompt, the meaning is probably to choose import settings. For the first time, you can choose the second one without importing the settings, then click OK.
The following interface appears, which is the most important step to activate. There are three options (the first is to enter JetBrains's account, which is not introduced here).
The second type is to enter the registration code, the registration code can go to the Internet to find. Like what:
Here I chose the third one, using a terminal-authorized server address. This server can be configured on its own, or can be found on the Internet. I just found it on the Internet.
Refer to: Or
Here's the final step, which is to choose which development tool's shortcut keys, IDE themes, fonts, colors, and so on. I choose Default, click OK directly.
To the installation of this development tool. The following configuration is the Python development environment, the code parser that installs Python.
Python installation can refer to this installation Python, here is very detailed, do not do too much introduction.
Complete the Python installation and start installing the Python Web development framework below.
Python has a lot of development frameworks that can be understood on its own. I've learned about two Flask and Django.
Beginners are generally advised to learn Flask, a lightweight web development framework, and a heavy-weight web development framework that Django belongs to MVC. (This is not installed here, after all, I am also a beginner ...) )
First, install Flask a lightweight web development framework.
Run Windows first on the command line. (i.e. cmd)
Input:pip install flask
After the installation is complete, test for success. Input: Python
Then enter: From flask import flask
If there is no error, the installation is successful. Continue to the next step. Install the Flask-sqlalchemy package, SQLAlchemy I understand it as an ORM framework, similar to the. NET EF framework.
Install SQLAlchemyfirst. Input: Pip Install SQLAlchemy
After the installation is complete, then install flask-sqlalchemy. Input: Pip install Flask_sqlalchemy
Then test to see if the installation was successful. Input: from flask_sqlalchemy import SQLAlchemy
If there is still no error, it means the installation was successful. By this Flask the Web development framework has been installed.