Installing the required software

简介: Installing Python on Mac OSXInstalling virtualenv$ pip3 install virturalenv -- 安装虚拟环境$ virtualenv ENV -- 创建自己的虚拟环境,会创建如图下的目录结构virtualenv-15.
  1. Installing Python on Mac OSX
    • Installing virtualenv
      $ pip3 install virturalenv -- 安装虚拟环境
      $ virtualenv ENV -- 创建自己的虚拟环境,会创建如图下的目录结构
      virtualenv-15.0.3

      Paste_Image.png

使用虚拟环境的原因:

1. for example, if one of your web applications requires 
one version of the library and another application, 
due to some legacy or compatibility issues, r
equires another version of the same library,
or if changes made in one library or 
application break the rest of the applications
2. Virtualenv can be used to avoid such problematic situations. 
It will create its own environment so that 
it will not mess with your global settings. 
It usually creates its own directories and 
shared libraries to make virtualenv work 
without any external interference
  1. Installing Django
    $ pip3 install Django==1.10.3 -- 安装Django不指定版本的话安装最新版本
    验证是否安装成功
    $ django-admin.py --version
    显示版本表示安装成功

Paste_Image.png

django-admin作用说明:
django-admin.py
This utility is the heart of Django's project management facilities,
as it enables the user to do a range of project management tasks, including these:
• Creating a new project
• Creating and managing the project's database
• Validating the current project and testing for errors
• Starting the development web server

启动服务:

$ python3 manage.py runserver 0.0.0.0:<port number>

Paste_Image.png

注意:我们只是用了pip3安装了django,所以启动时使用命令python3 manage.py runserver,如果使用python manage.py runserver会报异常提示未安装django

目录
相关文章
|
算法 Java Go
Go语言GC:详解GC的五个阶段
【2月更文挑战第20天】
413 0
|
JavaScript 前端开发
location.href和 window.location的区别有这些!
location.href和 window.location的区别有这些!
3465 3
|
10天前
|
存储 关系型数据库 分布式数据库
PostgreSQL 18 发布,快来 PolarDB 尝鲜!
PostgreSQL 18 发布,PolarDB for PostgreSQL 全面兼容。新版本支持异步I/O、UUIDv7、虚拟生成列、逻辑复制增强及OAuth认证,显著提升性能与安全。PolarDB-PG 18 支持存算分离架构,融合海量弹性存储与极致计算性能,搭配丰富插件生态,为企业提供高效、稳定、灵活的云数据库解决方案,助力企业数字化转型如虎添翼!
|
9天前
|
存储 人工智能 Java
AI 超级智能体全栈项目阶段二:Prompt 优化技巧与学术分析 AI 应用开发实现上下文联系多轮对话
本文讲解 Prompt 基本概念与 10 个优化技巧,结合学术分析 AI 应用的需求分析、设计方案,介绍 Spring AI 中 ChatClient 及 Advisors 的使用。
417 130
AI 超级智能体全栈项目阶段二:Prompt 优化技巧与学术分析 AI 应用开发实现上下文联系多轮对话
|
3天前
|
存储 安全 前端开发
如何将加密和解密函数应用到实际项目中?
如何将加密和解密函数应用到实际项目中?
200 138
|
9天前
|
人工智能 Java API
AI 超级智能体全栈项目阶段一:AI大模型概述、选型、项目初始化以及基于阿里云灵积模型 Qwen-Plus实现模型接入四种方式(SDK/HTTP/SpringAI/langchain4j)
本文介绍AI大模型的核心概念、分类及开发者学习路径,重点讲解如何选择与接入大模型。项目基于Spring Boot,使用阿里云灵积模型(Qwen-Plus),对比SDK、HTTP、Spring AI和LangChain4j四种接入方式,助力开发者高效构建AI应用。
382 122
AI 超级智能体全栈项目阶段一:AI大模型概述、选型、项目初始化以及基于阿里云灵积模型 Qwen-Plus实现模型接入四种方式(SDK/HTTP/SpringAI/langchain4j)
|
3天前
|
存储 JSON 安全
加密和解密函数的具体实现代码
加密和解密函数的具体实现代码
200 136
|
21天前
|
弹性计算 关系型数据库 微服务
基于 Docker 与 Kubernetes(K3s)的微服务:阿里云生产环境扩容实践
在微服务架构中,如何实现“稳定扩容”与“成本可控”是企业面临的核心挑战。本文结合 Python FastAPI 微服务实战,详解如何基于阿里云基础设施,利用 Docker 封装服务、K3s 实现容器编排,构建生产级微服务架构。内容涵盖容器构建、集群部署、自动扩缩容、可观测性等关键环节,适配阿里云资源特性与服务生态,助力企业打造低成本、高可靠、易扩展的微服务解决方案。
1356 8