🤖 AI大模型工程师 · 学习记录

AI工程师 · 14周系统学习之路

第1周:Python基础 & 环境搭建

日期:2026-05-28 | 状态:完成

学习目标

学习笔记

Python基础

# 列表推导式
squares = [x**2 for x in range(10)]

# 装饰器
def timer(func):
    def wrapper(*args, **kwargs):
        import time
        start = time.time()
        result = func(*args, **kwargs)
        print(f"耗时: {time.time()-start:.2f}s")
        return result
    return wrapper

开发环境搭建

conda create -n aistudy python=3.11 -y
conda activate aistudy
pip install openai python-dotenv langchain chromadb flask

踩坑记录

问题 解决
pip安装慢 pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
虚拟环境版本不对 用conda指定版本