A KDnuggets blog in 2018 initiated a poll: What is the best Python IDE for data science?
More than 1,900 people participated in this survey, and the survey results are shown in the figure below. The first 5 options are:
Jupyter,57%
PyCharm,35%
Spyder,27%
Visual Studio Code,21%
Sublime Text,12%
If you are a data analyst, use a notebook to facilitate data analysis. Use tutorial:
What can jupyter notebook do? www.zhihu.com
If you are a developer, use pycharm to facilitate project management. Use tutorial:
Python integrated development environment (IDE) decisively uses pycharm, let me talk about the following 2 content specifically:
1 ) What is the relationship between pyhthon compilation environment and development environment?
2 ) How do I get started quickly with pycharm when I first started to learn Python?
- What is the relationship between pyhthon compilation environment and development environment?
The Python compilation environment can be understood as the foundation of our house, because only with the foundation can the things of other houses run smoothly in this environment. Similarly, the python compilation environment is the foundation in the software. Only with this environment, the stuff you develop can run.
So what the hell is the Python development environment?
In order to complete the data analysis "building a house" faster and more efficiently, we need a development tool to complete this task. The corresponding development tool for python is pycharm. Maybe other books will also talk about other development tools, but pycharm is the best development tool, this is the right choice.
Now you understand why you need to install another pycharm after installing the python compilation environment.
This is like, if you are using an Apple mobile phone, the operating environment installed is iOS (but this operating environment has been installed by the manufacturer before you buy the mobile phone), of course you can use SMS Chat with friends. But SMS is too inconvenient, so you will install a WeChat to complete your chatting task. This WeChat is equivalent to the pycharm you installed, a tool to assist you in development, born for convenience.
1 ) First, install the python runtime environment
Because python is cross-platform, it can run on Windows, Mac and various Linux/Unix systems.
To start learning python programming, you must first install python on your computer. After installation, you will get a python interpreter, a command line interactive environment.
Install Python on Windows
First, download the 64-bit installer or 32-bit installer corresponding to the latest version of Python3 from the Python official website according to your Windows version (64-bit or 32-bit), and then compile the downloaded exe installation package.
Pay special attention to the Add Python to PATH option in the figure above, and then click "Install Now" to complete the installation.
Install Python on Mac: Download Python from Python official website, double-click to compile and install.
How to verify whether the Python installation is successful?
After the installation is successful, find the "Command Prompt" in the attachment in the windows start menu, open the command prompt window, type python and press Enter, see the screen that appears in the figure, it means that the Python installation is successful!
(When compiling Python on Mac and Linux, please open a terminal and compile python3.)
If you see a prompt that'python' is not an internal or external command', this is because you forgot to check'Add Python to PATH' when you reinstall it. It is recommended to recompile the Python installer. Remember to check this option.
2 ) Download the development environment tool pycharm
Download Pycharm address for each platform: jetbrains.com/pycharm/d
The professional version is charged, and the community version is free. For novices, the free community edition is enough.
(Student free version application address: sales.jetbrains.com/hc/)
After downloading, click the exe file to install it.
3 ) How to quickly get started with pycharm
Let's take a look at how to create your first data analysis project with pycharm: helloworld.
After clicking "create new project", follow the order in the figure to create the project. In the following example, I will name the project "Heloworld"
After creating the project, where can I write the python code?
At this time, we need to create a module (in fact, each python file is a module) and complete the data analysis code in the module. How to create a module?
Step 1: Click "new" in "File" in the menu bar,
Step 2: Select "Python file" in the dialog box that appears,
Step 3: Enter the python file name in the dialog box that appears, here I named the file "hello".
As you can see, the suffix of python module files is ".py". After creating a new module, we can write code here.
After creating the module, you can enter the first line of python code in your life in this module file, here I enter print hello world. Used to output hello world on the screen.
After the code is written, click Run under Run in the menu bar to allow the script file.
Finally, you will find hello world in the console.
Well, in the future you can write code in pycharm and run your code as above.
Recommended Posts