python - environment to build

 

 

 

 

 

Preface:

Python is an interpreted object-oriented programming language. It is open source, free and cross-platform.
Python novice very friendly, powerful, efficient and flexible and offers a number of program modules.
It is widely used Web programming, writing reptiles, data analytics, machine learning and artificial intelligence.

First, install Python in Windows

Open Python's official website https://www.python.org, select the appropriate version of the operating system, download and install:

Here we choose to download Python3.6.4: Windows x86-64 executable installer

 

Second, the installation Python3 under Linux

Method a: using the setup command to install Python 3.6
in Fedora, Cent OS like the Linux operating system, may be used yum command to install Python, the following commands:
yum the install to python3
in Debian operating system, can use the apt-get command to install Python, the following commands :
Apt-GET install python3
Tip: when using the install command to install Python, you need to keep the network stable.
Method two: Python official website to download directly to the source code and compile the installation
can also be downloaded in the official Python installation package, and then extract the compressed package is downloaded in the terminal command mode with the following command:
the tar-3.6.4.tar.xz -xzvf Python
in the command mode terminal, the files are decompressed after the subdirectory, and then installed using the following command:
./configure
the make the install
the make

 Third, install Python in Mac

Mac system comes with python2.7 environment, enter "python" Enter in the terminal Terminal can enter the interpreter.
Here you can execute python script.

Fourth, install Integrated Development Environment

Support Python IDE has a lot of development, such as:

1, Eclipse + PyDev plug-in

If you're used to doing Java development with Eclipse, you can choose to do Eclipse + PyDev Python development.

2, Visual Studio + PTVS plug

If you have installed VS for the development of other aspects, by installing PTVS plug-in, you can support the Python development.

3, PyCharm (recommended)

PyCharm is a focus on the development of Python IDE, many features are out of the box. In Windows, Linux and macOS
download the installation package can be installed, it is relatively simple. Suitable for beginners to get started.

A. Download PyCharm

Open PyCharm official website: http: //www.jetbrains.com/pycharm/

Click "DOWNLOAD NOW" button

Select the operating system: Windows, macOS, Linux

Select versions: Professional, Community

Community Edition is a free open source version of the professional need to pay a 30-day free trial period.

Click "DOWNLOAD" button to download

B. Install PyCharm

Double-click the exe file to install it:
As more PyCharm take up memory, it is recommended that you do not install the C drive.

In addition to the options you need to set the following figure, set up other windows remain default. (The first option requires a system according to the type of selection is 32-bit or 64-bit.)

Create a Python file
on the project name right, select New | Python File, enter the file name 'Hello', click on "OK", the system
will automatically set the extension .py

运行Python文件
在文件名或编辑窗口中右键,选择Run ‘Hello’命令,就会在控制台中输出运行结果。
也可以在菜单Run中,选择Run ‘Hello’命令运行文件。

打开Python文件
打开当前项目以外的文件,可以在菜单栏,选择File|Open…命令打开。
也可以将文件直接从资源管理器拖到PyCharm的编辑窗口中。

添加Python文件
将文件拷贝到项目的路径下,便可将文件添加到当前项目中。

Guess you like

Origin www.cnblogs.com/Teachertao/p/11204289.html