How to install python environment?_python environment installation

foreword

Download and install the Python interpreter

To start writing Python code, you first need to download and install the Python interpreter. Follow the steps below:

  1. Visit the official Python website (https://www.python.org) and go to the "Downloads" page.
  2. Find the Python version for your operating system on the page, choosing the latest stable version is usually recommended. Click the corresponding download link to download.
  3. Execute the downloaded installer and follow the prompts to install it. During installation, you can choose to customize the installation path and components.
  4. After the installation is complete, open the command prompt (Windows) or terminal (macOS and Linux), and enter the "python" command. If the Python version information is displayed, the installation is successful.

Set Python environment variables

In order to use the Python interpreter anywhere, you need to set the Python environment variable. Follow the steps below:

  1. Open the system's environment variable settings (Windows) or open a terminal and enter the bash profile (macOS and Linux).
  2. Add the path where Python is installed to your system's PATH variable. For example, if your Python is installed in the "C:\Python" directory, add "C:\Python" to the PATH variable of the system.
  3. Save changes and close the settings window.
  4. Open a new command prompt or terminal, and enter the "python" command. If the Python interpreter is successfully executed, it means that the environment variable is set successfully.

Taking Linux as an example, installing a Python interpreter on a Linux system is the first step in setting up a Python development environment. Follow the steps below:

  1. Open a terminal and enter the following command to check whether the system has Python pre-installed:

python --version

  1. If the command does not find Python or the version is low, you need to install the Python interpreter. Run the following command in the terminal to install Python3:

sudo apt update sudo apt install python3

  1. Once the installation is complete, you can run the following command again to verify that the Python installation was successful:

python3 --version

Install the Integrated Development Environment (IDE)

  1. PyCharm: A powerful Python IDE developed by JetBrains, which provides rich functions such as code completion, debugging, and version control.
  2. Visual Studio Code: A lightweight cross-platform editor that supports Python extensions and has powerful code editing and debugging functions.
  3. Anaconda: A Python distribution for data science and machine learning with built-in libraries and tools for scientific computing and data analysis.
  4. Spyder: A Python IDE focused on scientific computing, providing a wealth of scientific computing and data analysis functions.

Here I would recommend VS Code , mainly because it is relatively lightweight

VS Code is a powerful and popular text editor for various programming languages, including Python. Follow the steps below to install VS Code:

  1. Open a terminal and run the following command to add the Microsoft GPG key:

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg

  1. Add the VS Code repository by running the following command:

echo “deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main” | sudo tee /etc/apt/sources.list.d/vscode.list

  1. Update the package list and install VS Code:

sudo apt update sudo apt install code

  1. Once installed, you can find VS Code in the application menu

In order to use VS Code for Python development, you need to install and configure the Python extension. Follow the steps below:

  1. In VS Code, click the extension button on the left (or press Ctrl+Shift+X ).
  2. Enter "Python" in the search box and select the "Python" extension, click the "Install" button to install.
  3. After the installation is complete, click the "Reload" button to reload VS Code.
  4. You can now find the "Explorer" view in the left navigation bar of VS Code. In Explorer, select your Python project folder.
  5. After selecting the Python project folder, VS Code will automatically detect your Python interpreter and prompt you to choose the Python environment to use. Choose your installed Python interpreter.
  6. You can now create and edit Python files in VS Code, and use the built-in debugging features for code debugging.

By downloading and installing the Python interpreter, setting Python environment variables, and selecting a suitable integrated development environment (IDE), you have built a complete Python development environment. Now you can start writing Python code and exploring this powerful programming language. Whether you are a beginner or an experienced developer, a good development environment will improve your productivity and coding experience. Happy writing Python code!

Finally, I would like to thank everyone who has read my article carefully. Reciprocity is always necessary. Although it is not a very valuable thing, you can take it away if you need it:

1. Introduction to Python

The following content is the basic knowledge necessary for all application directions of Python. If you want to do crawlers, data analysis or artificial intelligence, you must learn them first. Anything tall is built on primitive foundations. With a solid foundation, the road ahead will be more stable.All materials are free at the end of the article!!!

Include:

Computer Basics

insert image description here

python basics

insert image description here

Python introductory video 600 episodes:

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.

2. Python crawler

As a popular direction, reptiles are a good choice whether it is a part-time job or as an auxiliary skill to improve work efficiency.

Relevant content can be collected through crawler technology, analyzed and deleted to get the information we really need.

This information collection, analysis and integration work can be applied in a wide range of fields. Whether it is life services, travel, financial investment, product market demand of various manufacturing industries, etc., crawler technology can be used to obtain more accurate and effective information for use.

insert image description here

Python crawler video material

insert image description here

3. Data analysis

According to the report "Digital Transformation of China's Economy: Talents and Employment" released by the School of Economics and Management of Tsinghua University, the gap in data analysis talents is expected to reach 2.3 million in 2025.

With such a big talent gap, data analysis is like a vast blue ocean! A starting salary of 10K is really commonplace.

insert image description here

4. Database and ETL data warehouse

Enterprises need to regularly transfer cold data from the business database and store it in a warehouse dedicated to storing historical data. Each department can provide unified data services based on its own business characteristics. This warehouse is a data warehouse.

The traditional data warehouse integration processing architecture is ETL, using the capabilities of the ETL platform, E=extract data from the source database, L=clean data (data that does not conform to the rules), transform (calculate tables in different dimensions, different granularities, and different business rules according to business requirements), T=load processed tables into the data warehouse incrementally, in full, and at different times.

insert image description here

5. Machine Learning

Machine learning is to learn part of the computer data, and then predict and judge other data.

At its core, machine learning is "using algorithms to parse data, learn from it, and then make decisions or predictions about new data." That is to say, a computer uses the obtained data to obtain a certain model, and then uses this model to make predictions. This process is somewhat similar to the human learning process. For example, people can predict new problems after obtaining certain experience.

insert image description here

Machine Learning Materials:

insert image description here

6. Advanced Python

From basic grammatical content, to a lot of in-depth advanced knowledge points, to understand programming language design, after learning here, you basically understand all the knowledge points from python entry to advanced.

insert image description here

At this point, you can basically meet the company's employment requirements. If you still don't know where to find interview materials and resume templates, I have also compiled a copy for you. It can really be said to be a systematic learning route for nannies.

insert image description here
But learning programming is not achieved overnight, but requires long-term persistence and training. In organizing this learning route, I hope to make progress together with everyone, and I can review some technical points myself. Whether you are a novice in programming or an experienced programmer who needs to be advanced, I believe that everyone can gain something from it.

It can be achieved overnight, but requires long-term persistence and training. In organizing this learning route, I hope to make progress together with everyone, and I can review some technical points myself. Whether you are a novice in programming or an experienced programmer who needs to be advanced, I believe that everyone can gain something from it.

Data collection

This full version of the full set of Python learning materials has been uploaded to the official CSDN. If you need it, you can click the CSDN official certification WeChat card below to get it for free ↓↓↓ [Guaranteed 100% free]

insert image description here

Good article recommended

Understand the prospect of python: https://blog.csdn.net/SpringJavaMyBatis/article/details/127194835

Learn about python's part-time sideline: https://blog.csdn.net/SpringJavaMyBatis/article/details/127196603

Guess you like

Origin blog.csdn.net/weixin_49892805/article/details/131867098