本地使用conda创建django虚拟环境

1、首先本地安装好conda。

2、创建django的虚拟环境

python 复制代码
conda create -n django   
# 这里的 django只是虚拟的名称,自己随便名字就行,只要你自己知道这个是django的虚拟环境就行。

3、安装成功,查看虚拟环境

python 复制代码
conda env list

4、激活虚拟环境

python 复制代码
conda activate django

5、安装django

python 复制代码
pip install django

6、创建django工程

python 复制代码
django-admin startproject djangoproject

7、查看那文件夹里面,新建的django工程

8、运行启动项目

python 复制代码
python3 manage.py runserver

9、注意!!!!

Django与python 的版本号一定要匹配,我就是在这块卡了好久,总是运行不成功。

相关推荐
金銀銅鐵1 小时前
用 Python 实现 Take-Away 游戏
python·游戏
copyer_xyf2 小时前
Agent 流程编排
后端·python·agent
copyer_xyf2 小时前
Agent RAG
后端·python·agent
copyer_xyf3 小时前
【RAG】向量数据库:milvus
后端·python·agent
copyer_xyf3 小时前
Agent 记忆管理
后端·python·agent
星云穿梭18 小时前
用Python写一个带图形界面的学生管理系统——完整教程
python
金銀銅鐵18 小时前
用 Pygame 实现 15 puzzle
python·数学·游戏
黄忠1 天前
大模型之LangGraph技术体系
python·llm
hboot2 天前
AI工程师第二课 - 数据处理
人工智能·python·数据分析
用户8356290780512 天前
使用 Python 自动化 PowerPoint 形状布局与格式设置
后端·python