We must first of its profits
Want to write code that must first install depend on the environment. So, today we chat tool preparation before writing code.
1. Install python
Under linux and macos, python is directly mounted.
I use windows, here to talk about the process of installing python next win.
python.org
This is the official website to download the latest version of windows like;
Outside the network is slow, you can respond in the background editor receive.
You can choose to install to the default location, or you can customize the installation directory.
Note: ** Check the "Add Python 3.7 to PATH" **
When you install python install package automatically installs the pip package management tool, it will be mentioned later in pip.
2. Create a python file first
Open IDLE ==>
Select New File ==> under the File menu
Enter the following code: print ( 'Cup basketball') ==>
Save the file as test.py
3.print function
4. two ways to run python files
1) In the terminal, go to the directory where test.py, execute the following command: Python test.py
2) Run the file in IDLE
5. Choose Editor
Next, we have to choose a comfortable editor.
note:
python interpreter is, there are many versions, can coexist.
pycharm, vs code is editor that lets you write code very easily, and support other functions such as debugging.
For pycharm IDE, you need setting, select the python interpreter (python installation directory)
If you want to see real-time operating results (for data analysis), try jupyter notebook
Instructions for use:
First with pip install it, then enter your folder directory, shift + right to open cmd, enter jupyter notebook, on a web page to open jupyter
Personal feeling, sublime configuration is not really suitable for beginners.
Just learning python, I recommend choosing pycharm Community Edition on it, you can slowly transition to vs code.
6.pip and anaconda
We know that python has a wealth of extensions, so that we do not have to be concerned about the implementation code at the bottom.
If you are still in the programming world confused and do not know their own future planning can join our Python Qiuqiu skirt 758 to 784 out of 214 word article to see how the predecessors to learn! Exchange of experience! It is a senior development engineer python, python script from basic to web development, reptiles, django, data mining and other projects to combat zero-based data are finishing. Given to every little python partner! Share some of the ways to learn and need to pay attention to small details
But how do we install these extensions?
They would have to talk about a pip.
python extension library that comes with a third-party management tools.
Performing pip install xxxx (numpy) at the terminal, you can be installed corresponding library.
Anaconda then what is it?
https://www.anaconda.com/
Anaconda is that you can easily get the package and on the package can be managed, while releases to the environment can be unified management.
Anaconda contains numpy, ipython, Python, including more than 180 scientific packages and their dependencies.