How to Install DeepSeek Locally, Explained Simply
The domestic large model Deepseek is here. Let me teach you how to install DeepSeek locally in plain and easy-to-understand language, just as simple as teaching a game! Before installation, first confirm your machine configuration. It is recommended to read " What configurations are needed to install DeepSeek? Can a regular computer do it?". Before this, we had written an article on How to install DeepSeek using Ollama?. Hope it helps you.

Step 1: Prepare the "Toolbox"
Just like installing Steam to play games, let's first install two "tools":
Install Python (a software that lets the computer understand instructions):
Go to the Python official download page, download the latest version (remember to check the "Add Python to PATH" option).
After installation, press【Win + R】on the keyboard, type【cmd】, then type【python --version】. If a version number is displayed, you've succeeded!
Install the helper (a code package that lets the computer run DeepSeek):
In the black window (cmd) just now, type these two lines and press Enter:
pip install transformers pip install torch
Step 2: Download the "AI brain"
The "brain" file of DeepSeek is very large. Let's go to the official website to download it:
Open your browser, visit huggingface.co, search for "DeepSeek", or directly click here to go there.
After finding the model page, click "Files" (like a folder) and download all files (you need to register an account, as simple as registering a game account).
Place the downloaded folder on the desktop and name it deepseek-model (any name is fine, as long as you can remember it).
Step 3: Write a "launch command"
Create a new Notepad file on the desktop and rename it run_ai.py (note the suffix is .py).
Right-click to open it with Notepad, copy and paste this code:
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load the path to your downloaded model folder (e.g., "Desktop/deepseek-model")
model = AutoModelForCausalLM.from_pretrained("your model folder path")
tokenizer = AutoTokenizer.from_pretrained("your model folder path")
# Let AI answer a question
prompt = "Hello, please help me write a poem about summer."
inputs = tokenizer(prompt, return_tensors="pt")
# Generate answer
outputs = model.generate(**inputs, max_length=100)
print(tokenizer.decode(outputs[0]))Step 4: Run DeepSeek
Save the run_ai.py file just now.
Open the cmd window, type【cd Desktop】to enter the desktop.
Type the previous【python run_ai.py】and wait for it to load (it may take a few minutes the first time).
If you see the poem written by DeepSeek, you've succeeded! Isn't it simple?
Script Planner Assistant▸
AI Apps
AI News 