Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build an introduction to Python Environment

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces you how to build an introduction to the Python environment, the content is very detailed, interested friends can refer to, hope to be helpful to you.

01 Python environment building

1. Preface

Mainly for the study of Python 3.x version.

Python 3.x version is an upgrade version based on Python 2.x, there are a lot of syntax changes, the project application process may encounter the current environment of the version 3, found that the source code is the 2 version. There will be an error message at run time.

The python3 version environment uses the error correction method of the python2 version of open source project code.

two。 Construction of development environment

The tutorial recommends Anacoda3 (kernel) + PyCharm (editor)

Anaconda download address: https://www.anaconda.com/download/

PyCharm download address: http://www.jetbrains.com/pycharm/download/

Slide the layout left and right, and the sliding sequence can be set on the toolbar.

Click the template / favorites / picture on the left to add the sequence directly.

To insert into the middle of the sequence, click on an item in the sequence, and then click on the template / favorites / picture on the left.

2.1 anacoda installation

As a matter of fact, Anacoda3 is still python3, which is a package of some commonly used case bases.

Download anacoda and install it. Choose your own storage location. In "Advanced Installation Options", check "Add Anaconda to my PATH environment variable." ("add Anaconda to my environment variable." ).

Note: later when you expand Anacoda's library, you may encounter problems and installation experience. To install tensorflow in Anacoda, the path option must be checked in the process of installing Anacoda, otherwise there will be an exception when Anaconda Prompt is used.

After installation, you can find it from the start menu. Click "start"-"Anaconda3 (64-bit)"-"Anaconda Navigator". If Anaconda Navigator can be started successfully, the installation is successful.

Click "start"-- "Anaconda3 (64-bit)"-- "right-click Anaconda Prompt"-- click "run as administrator", and type conda list in Anaconda Prompt to view the installed package name and version number. If the results can be displayed normally, the installation is successful.

2.2 PyCharm installation

There is no special need to pay attention to the installation of PyCharm, choose the storage location. Click next until you are finished.

PyCharm needs to be activated, enter any of the following two registration codes in License server address, Pycharm new registration code 1: http://idea.liyang.io or pycharm new registration code 2: http://xidea.online, and then click OK, you can activate Pycharm.

Then enter by default and enter the welcome interface.

3. Environmental use

Create a new project, select the project save path, and choose which core: the python.exe file.

Seting (ctrl + Alt + S) can set the code style, interface and font of the editor and explore on its own.

At this point, you can select the project, right-click, and create a new python execution file.

The first python program test

Helloworld.py

Input

Print "hello world"

Shift + F10 run or click the green execute button to run

The following console output

Hello world

On how to build the Python environment to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report