Setting Up Python Environment and Project Configuration

Setting Up Python Environment and Project Configuration

1.Download link for Python https://www.python.org/downloads/windows/ 2. Installation Select custom installation, and make sure to check the box to add Python to the environment path; Verification after installation: python –version pip –version Pip is the package manager for Python 3. Create a virtual environment First, create a project directory, for example, E:\Code\llmops\llmops-api Open cmd in that … Read more

Third-Party Libraries in Python Web Development

Virtual Environment1. Open the terminal by entering cmd in the path bar of the target folder2. Create: path>python -m venv your_env_name3. Activate: path>your_env_name\Scripts\activate4. Deactivate: (your_env_name) path>deactivateDjango: Web Framework1. Install Django in the virtual environment(your_env_name) path>pip install Django2. Create a project(your_env_name) path>django-admin startproject project_name . Commanddir to view the directory under the path Filemanage.py for managing … Read more

Python Tips 01: A Super Practical Guide to Packaging Programs into EXE Files

Starting from Anaconda, step by step guide to package your script πŸš€ In daily development, we often write efficient scripts in Python, such as data processing tools and automation programs. However, if we want to share them with non-programmer friends, they may not have a Python environment installed. In this case, packaging the Python program … Read more

Steps to Set Up a Python Virtual Environment

Steps to Set Up a Python Virtual Environment

Open the folder where you want to run the program, and type cmd in the current folder. In the cmd, type: Create a virtual environment cls is the name you give to the virtual environment conda create -n cls python==3.8.5 Activate the virtual environment conda activate cls Install various libraries from the requirements folder pip … Read more

When CMake Meets Python

When CMake Meets Python

CMake is not unfamiliar to many who are familiar with C and C++. Today, we will look at a somewhat unusual application scenario: using CMake to manage and run Python applications. This approach can be effective in certain situations, such as when code generation is done in C++, and tool scripts are written in Python, … Read more

Installing the MKL Library for Python

Installing the MKL Library for Python

I tested that the MKL library’s Python version should ideally be kept at 3.9, and not greater than 3.9, such as 3.10, 3.11, 3.12, or 3.13, as they are currently not very compatible.Therefore, when configuring, it is best to use conda, and thencreate a virtual environment. conda create -n my_env python=3.9 Activate the virtual environment … Read more

Essential for Python Developers! Why You Need Virtual Environments: Learn to Manage Project Dependencies Efficiently in 3 Minutes!

Essential for Python Developers! Why You Need Virtual Environments: Learn to Manage Project Dependencies Efficiently in 3 Minutes!

Have you ever encountered these frustrating moments? – Project A requires <span><span>Python 3.7</span></span>, but Project B can only use <span><span>Python 3.10</span></span>, frequently switching versions leads to confusion; – Code that runs perfectly on your local machine throws errors on another computer due to incompatible dependency versions; – When installing a new package, accidentally overwriting critical … Read more

Beginner’s Guide to Packaging Python Programs: A Dual-Platform Guide for Windows/Linux

Beginner's Guide to Packaging Python Programs: A Dual-Platform Guide for Windows/Linux

πŸ“¦ Beginner’s Guide to Packaging Python Programs: A Dual-Platform Guide for Windows/Linux 🌟 Why Package? βœ… Users do not need to install the Python environment βœ… Protect source code βœ… One-click installation/uninstallation is more convenient πŸ–₯ Windows Platform: Packaging EXE Files Recommended Tool: PyInstaller (Five-Star Rated Tool) # One-click installation pip install pyinstaller πŸš€ 3 … Read more

Introduction to Python Environment Features

Introduction to Python Environment Features

Reminder: This article provides a detailed introduction to the structure of the Python environment, basic usage of Python virtual environments, and environment & dependency management in Python. 0. What is a Python Environment A Python environment refers to a specific setup that contains a series of software tools and packages required to run Python code. … Read more

Writing Makefiles for Python Projects

Writing Makefiles for Python Projects

As a fan of Makefiles, I use them in almost every hobby project. I also advocate for their use in work projects. For open source projects, Makefiles inform code contributors on how to build, test, and deploy the project. Moreover, if you use Makefiles correctly, they can greatly simplify your CI/CD process scripts, as you … Read more