Building a Python development environment (applicable to Xiaobai)

The choice of Anaconda and Python

I personally understand that Anaconda is an integration of Python. Anaconda is said to have more than 3,000 third-party packages that are relatively powerful, but this article explains how to install the normal version of Python.

Download Python

Enter the Python official website, click Download
insert image description here
to select a favorite Python version, click to enter the details page of the version and scroll down, you can see many options for downloading.
insert image description here
It needs to be explained here. Generally, we should choose to download the executable installer file, because this file is downloaded as an exe executable file, which is more convenient to install. (Executable files under Windows are generally exe, msi, etc.)

Next, there is another question to pay attention to, which is to download 64-bit Python or 32-bit Python. Personal suggestions for this issue.

  • Students with 64-bit operating system download 64-bit Python
  • Students with 32-bit operating system download 32-bit Python

Click on This PC, select Properties, and view the operating system bitness.
insert image description here
After confirming everything, we can download Python, because I suffered a lot from this place when I first learned Python, so I hope everyone pays attention, otherwise there may be many third-party package installation failures in the development process in the future, through this The question can also explain one thing indirectly: Since Python is divided into 64-bit and 32-bit, is the third-party package of Python also divided into 64-bit or 32-bit? The answer is: in most cases yes.

Note: Students with Mac systems only need to pay attention to the number of operating systems, download the corresponding version of python, and install it according to the tutorial.

Install Python

Click the downloaded Python to install.
insert image description here
Generally, when installing the program, my style is all the way to Next, but after this, I often look like this.
insert image description here
Here we click Customize installation (custom installation), and remember to check Add Python To Path.
insert image description here
Select and click Next.
insert image description here
Here you need to check the first Install for all user, and modify the installation directory. I can directly modify C to D (I am lazy).
insert image description here
Click Next to continue the installation.
insert image description here
Wait for the installation to complete. After the installation is complete, enter the Windows terminal and try to enter some test commands to test whether Python is installed successfully.
insert image description here
If there is an unexpected situation, "not an internal or external command, nor a runnable program", please check whether there is a python installation path in the environment variable, and the Python installation path + Scripts, if not, we need to set these two path to the environment variable.

Install the most powerful Python editor in the universe

Personally, I think that if there is a good code editor for typing code, it will be a very good programming experience. Here we choose to install Pycharm, the most powerful Python code editor in the universe (this is the link). Click to enter the Pycharm download page, click download to download.

insert image description here
After the download is complete, click Install. All the way to next is enough, but here you need to pay attention not to install the program on the system disk (that is, the C disk) as much as possible, just modify the installation path.

After the installation is complete, click Start.
insert image description here
Click OK
insert image description here
because Pycharm is charged, so here we have to choose to try Baidu to solve this problem.
insert image description here
Click to download the registration code, fill in the obtained registration code into the Activation code, and click OK. At this point, the Pycharm installation is complete.
insert image description here
Import the Python environment into Pycharm

Use Pycharm to open our code, but found that Pycharm can not run the code, why is this, the reason is actually because we did not import the Python environment into Pycharm.
insert image description here
We click File in the upper left corner, click Settings, click Project: project name, and click Project Interpreter.
insert image description here
Click the small gear, click Add, and click System Interpreter to import the Python.exe file in your own Python installation folder. Then all the way to OK. The final rendering is as follows:
insert image description here
I hope that after reading this article, you can help you avoid some pitfalls in the process of installing the Python development environment. If you find some problems with the article, please comment in time, and this dog will modify it as soon as possible, thank you everyone.

Answer questions

  • If the activation code is invalid, just download a new one again.
  • Activation code = Activation code, remember to choose it.
    insert image description here
  • To install Python on macOS, just download the corresponding macOS software installation package, and the others are similar.

Finally: About Python technical reserves

It is good to learn Python whether it is employment or sideline business to make money, but to learn Python, you still need a study plan. Finally, everyone will share a full set of Python learning materials to help those who want to learn Python!

Friends, if you need it, you can scan the CSDN official certification QR code below on WeChat to get it for free [guaranteed 100% free] .

1. Learning routes in all directions of Python

The technical points in all directions of Python are sorted out to form a summary of knowledge points in various fields. Its usefulness lies in that you can find corresponding learning resources according to the above knowledge points to ensure that you can learn more comprehensively.
insert image description here

2. Essential development tools for Python

insert image description here

3. Excellent Python learning books

When I have learned a certain foundation and have my own understanding ability, I will read some books or handwritten notes compiled by my predecessors. These notes record their understanding of some technical points in detail. These understandings are relatively unique and can be learned. to a different way of thinking.
insert image description here

4. Python video collection

Watching the zero-based learning video is the fastest and most effective way to learn. Following the teacher's ideas in the video, it is still very easy to get started from the basics to the in-depth.
insert image description here

5. Practical cases

Optical theory is useless, you have to learn to follow along, and you have to do it yourself, so that you can apply what you have learned to practice. At this time, you can learn from some actual combat cases.insert image description here

6. Python exercises

Check the learning results.
insert image description here

7. Interview information

We must learn Python to find high-paying jobs. The following interview questions are the latest interview materials from first-line Internet companies such as Ali, Tencent, and Byte, and Ali bosses have given authoritative answers. After finishing this set The interview materials believe that everyone can find a satisfactory job.
insert image description here
insert image description here
Finally, don't let go of the enthusiasm you started at that time, and become stronger and better together.

Guess you like

Origin blog.csdn.net/libaiup/article/details/127809948