ubuntu Django mysql 入门

在Ubuntu服务器上搭建django + MySQL环境 今天在腾讯云上申请了一个免费体验30天的腾讯云服务器,借此机会,作为一个初学者,想整理一些关于Ubuntu相关操作,包括: 1、安装和配置各种常用工具 2、搭建python-web环境:python + django + MySQL 3、管理服务器 4、参考资料 注:本文是基于新的Ubuntu操作系统,当前系统里什么都没有安装。或许有的读者的操作系统已经安装了很多东西,可能会带来一些问题,如果读者在操作的过程遇到一些问题,需根据实际情况进行解决,也欢迎分享。 阅读详情

因为django自带的sqlite数据库存在一些缺陷具体可以参看http://blog.youkuaiyun.com/lifeiaidajia/article/details/8154440
简而言之,以下情况不适合使用django自带的sqlite 数据库。

  • 当有很多客户端要访问共享数据库时
  • 当服务器作为高流量网站使用时
  • 当有超大的数据集时,
  • 当需要较高的并发量时,

下文简要记录django + mysql 在Ubuntu 15.10上的配置。


ubuntu 安装MySQL数据库
参考http://blog.youkuaiyun.com/fighter_yy/article/details/40753889
使用以下命令可以完成安装:

  1. sudo apt-get install mysql-server 
  2. apt-get install mysql-client 
  3.  sudo apt-get install libmysqlclient-dev
  4.  sudo apt-get install python3-pymysql

如果使用的python 的版本为python2,则在安装python3-pymysql时将3去了,因为需要安装对应版本的mysql.具体原因我不知道。

注意安装的过程中需要设置数据库的密码,记得设置一个容易记忆的密码,后期会使用到,不要忘记了。
检查是否安装成功:

sudo netstat -tap | grep mysql

通过以上的命令可以查看到mysql的socket是否处于监听状态,如果处于监听状态,则安装成功。如下图所示:
MySQL安装成功的示意图

通过命令mysql -u root -p使用数据库。
这里写图片描述
显示数据库的命令为:show databases;
使用数据库的命令为:use databasename;
创建数据库的命令为:create database databasename;
注意sql语句以分号结尾。


Django的创建和配置
注意首先安装django。sudo pip install django
在命令终端通过import django 就能知道是否安装成功。如果出现如图所示的界面则为安装成功。

>>> import django
>>> django.get_version()

这里写图片描述
创建django的命令:django-admin startproject projectname;
进入子目录:cd projectname;
创建应用程序:django-admin startapp appname;
此时的项目的树形结为

johna@johna-Inspiron-N4030:~/xlx/sqltest0309$ tree
.
├── blog
│   ├── admin.py
│   ├── models.py
│   ├── tests.py
│   └── views.py
├── manage.py
└── sqltest0309
    ├── settings.py
    ├── urls.py
    └── wsgi.py

然后可以参考http://www.cnblogs.com/fengri/articles/django5.html,完成django框架配置mysql的工作。
具体来说在settings.py文件中修改installed_apps和DATABASES

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'blog',# add app created by myself
)

DATABASES = {
    'default': {
        # 'ENGINE': 'django.db.backends.sqlite3',
        # 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'fidodb',
        'USER': 'root',
        'PASSWORD': '123456',
        'HOST': '',
        'PORT': '',
    }
}

在blog.model文件中创建数据库表,简单创建的结果如下:

from django.db import models


class Employee(models.Model):
    name = models.CharField(max_length=20)

在终端中更新数据库的信息python manage.py makemigrations
更新数据库:python manage.py migrate
这里写图片描述
在MySQL中查看表是否创建成功:show tables;
这里写图片描述
其中blog_employee表就是在django的model中创建成功的。
到这里就完成了django 配置MySQL的相关步骤。

在win7上也一样的原理,win7可以直接参考http://www.cnblogs.com/fengri/articles/django5.html
只是MySQL的安装不一样,其他的步骤类似。

从零开始:Ubuntu Server中MySQL 8.0的安装与Django数据库配置详解 这也是为了方便测试而设置的,在将环境切换到生产环境之前,您应该删除这个数据库及其访问权限。简而言之,这段信息是关于MySQL安装过程中的一些安全和配置选项的提示。根据您的需求和环境,您可能需要采取特定的行动,例如为root用户设置密码或删除匿名用户。第二次输入密码提示才是数据库root用户的密码,默认root用户的密码为空,回车即可登录!这段信息是关于MySQL安全性的提示,它询问您是否要禁止root用户从远程进行登录。这个组件用于增强密码的安全性,它可以帮助您确保用户设置的密码足够强大。 阅读详情

相关推荐

Ubuntu搭建apache+python+django+mysql web开发环境

详细描述Ubuntu下如何搭建python的web开发环境

【Django】Ubuntu中配置Django环境

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录​ 一,创建django虚拟环境。1,创建python虚拟环境2,创建django项目。3,配置远程连接4,下载项目文件 ​ 一,创建django虚拟环境。 1,创建python虚拟环境 在虚拟机上创建python虚拟环境(linux) mkvirtualenv -p /usr/python3 虚拟环境名 2,创建django项目。 1.安装django(选择安装django2.1.x最新的一个版本2.1.10) pip ins.

weixin_53950583的博客 5861

Ubuntu 18.04.1+Mysql 5.7.29+Python 3.6.9部署django项目

最近被django项目部署搞得头疼,查阅了一些相关的资料,终于解决这个问题,因此在这里记录一下,加深印象。 ** 服务器环境:Ubuntu 18.04.1+Mysql 5.7.29+Python 3.6.9 ** 步骤一:布置环境 mysql安装(sudo apt-get update): 1.1命令安装 (1)sudo apt-get install mysql-server (2)sudo apt-get install mysql-client (3)sudo apt-get install libmysqlclient-dev 1.2使用 (1)启动服务 sudo /etc/init.

腾讯云Ubuntu部署Django(Django + uwsgi +nginx + MySQL)

本文将介绍django + uwsgi + nginx + mysql如何部署在腾讯云Ubuntu18.04。

m0_69631269的博客 1829

手把手教你用树莓派蓝牙抓取小米温湿度计2代数据,接入HomeAssistant(附密钥获取避坑指南)

本文详细介绍了如何通过树莓派蓝牙抓取小米温湿度计2代数据并接入HomeAssistant的完整流程。重点解析了获取32位加密密钥的三种方法,包括使用Telink Flasher工具、米家APP抓包和开源工具ATC_MiThermometer,并提供了HomeAssistant集成配置和常见问题排查指南,帮助用户实现稳定可靠的温湿度监测。

一名菜鸟攻城师 779

电流镜结构实战:从零理解MOS管偏置电路设计(附吴金课程补充)

本文深入解析电流镜结构在MOS管偏置电路设计中的关键作用,从基本原理到实战应用全面覆盖。通过分析偏置电路的核心原理、破解设计难题的实用技巧,以及进阶优化策略,帮助工程师掌握这一模拟电路设计的核心技术。特别适合需要理解电流镜结构和基准电路设计的读者参考学习。

ujm5678901的博客 256

Web环境搭建记录

搭建环境 : LAMP (Linux + Nginx/Apache + MySQL + PHP) 即把 Nginx/Apache、MySQL以及PHP安装在Linux系统上,组成一个环境来运行PHP的脚本语言,通常是网站。 1、简介 Linux:操作系统之一,这个不用多说了。 Apache:应用最广泛的Web服务器之一,其主要功能是提供网上信息浏览服务。Web服务器可以解析HTTP协议。当Web服务器接收到一个HTTP请求,会返回一个HTTP响应,例如送回一个HTML页面。为了处理一个请求Web.

Wawyw's Blog 284

scanpy单细胞转录组python教程(四):单样本数据分析之降维聚类及细胞注释

本文介绍了使用scanpy进行单细胞转录组分析的降维聚类和细胞注释流程。首先通过PCA降维并可视化主成分贡献,然后使用不同分辨率参数(0.2-1.0)进行Leiden聚类。通过Wilcoxon检验鉴定marker基因,并基于经典marker基因手动注释细胞类型。最后对低质量细胞群进行过滤,并重新计算邻居图和UMAP可视化。流程中包含PCA方差分析、多分辨率聚类比较、marker基因筛选和基于UMAP的细胞类型可视化等关键步骤,为后续分析奠定基础。

qq_42090739的博客 943

Ubuntu下搭建Linux+django+mysql环境

Ubuntu下搭建Linux+django+mysql环境

D_13133701173的博客 453

语义通信高斯信道仿真代码

【代码】语义通信高斯信道仿真代码。

一去不复返的通信er 427

第一篇:APS智能排产理论核心与求解器选型指南

本文系统解析了APS(高级计划与排程)系统的核心功能与技术实现。APS作为融合生产计划与排程的智能决策系统,通过运筹优化算法实现全局最优,平衡交付与效率。重点探讨了混合整数线性规划(MILP)在APS中的应用,包括设备分配、生产批量和人员班次优化等场景,并分析了其局限性与其他算法(如启发式算法)的互补性。文章还提供了APS实施策略建议和优化建模技巧,强调从简单模型开始迭代验证的重要性。最后介绍了甘特图在APS中的多维可视化作用,包括计划调整和决策支持功能。全文为理解APS系统原理及实践应用提供了全面指导。

算法工程师 544

ubuntu django mysql_django使用MySQL数据库流程(ubuntu版本)

1.数据迁移不同的app连接不同的数据库(例子中blog用默认的数据库,blog4用MySQL数据库)(1)要连接MySQL数据库,首先下载MySQL数据库和MySQLdb模块下载MySQL数据库的参考连接:http://www.linuxidc.com/Linux/2016-07/133128.htm而MySQLdb模块安装参考连接:http://blog.youkuaiyun.com/samxx8/art...

weixin_30621659的博客 240

Transformers 实战修炼与源码剖析专栏大纲

本专栏以 Hugging Face Transformers 为主线,围绕“能用、会调、敢上线、懂源码”四个目标展开。内容不把理论堆成公式墙,而是用真实或拟真的业务场景驱动:客服分类、合同抽取、知识库问答、模型微调、推理服务、监控告警、源码扩展等。采用“业务痛点 → 三人剧本对话 → 代码实战 → 总结思考”的四段式结构,让读者在动手完成一个个小项目的过程中,逐步理解 Tokenizer、Model、Pipeline、Trainer、Generation、PEFT、Accelerate、Serving等概念

davidwang456的专栏 925

linux搭建Django环境,Linux (ubuntu 12.04)下搭建Python Django环境

1. 检查python是否安装:直接在shell里输入python,如果已经安装了python,即可进入python bash,并看到版本号(如Python 2.7.3)——在ubuntu中python应该是已经默认安装好了2. 安装Django:sudopythonsetup.pyinstall检查Django是否安装:在python shell中输入:>>> import ...

weixin_29615645的博客 219

Sigrity OptimizePI Best Capacitor Location Estimation模式如何评估电容最佳位置操作指导

Sigrity OptimizePI Best Capacitor Location Estimation模式用于前仿真分析,评估电容的最佳位置以获得最小回路电感,如何分析,以下图为例进行说明。IC devices,输入U*, A*, B*, Q*, P*,将所有这些字母开头的器件都识别为IC。Min设置为1(最少电容个数为1),max设置为28(最多电容个数为28)Capacitors 输入C*,将所有C开头的器件都识别为电容。Grid X设置为8,Grid Y也设置为8。

weixin_54787054的博客 382

Linux 完全卸载 Neovim 的方法:解决权限问题和清除残留文件

Neovim 没有被完全卸载的原因,可能是因为它是通过非官方方式(如手动编译或二进制包)安装的。对于这种情况,使用apt卸载命令无法删除这些文件。因此,需要手动删除和中的相关文件。建议在安装软件时,尽量使用包管理器(如apt)进行安装,以便以后能够方便地卸载。如果你不太熟悉 Linux 系统,避免手动操作系统目录,除非你非常清楚自己的操作。通过上述方法,你应该能够彻底卸载 Neovim 并重新安装。

代码简单说 Vue、JAVA、PHP、Node.js 熟练运用,接口、架构、性能全搞定。 4943

Ubuntu18.04+python3.6的Django入门的安装部署(virtualenv+mysql)笔记

一、linux下安装Django 1.安装python Django 2.1版本兼容Python 3.5、3.6、3.7;Django 3.0版本兼容Python 3.6、3.7、3.8,选择在Ubuntu18.04中安装Python3.7: (1)在官网 下3.7.7的版本; (2)放在共享文件夹中了,所以copy到新建的python3文件夹中: sudo cp -r /mnt/hgfs/share/Python-3.7.7.tar.xz /usr/local/Python3 进行解压 tar -xv

三叉树的博客 495

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

再学Django

再学DjangoDjango简介特点:编程环境编写第一个Django应用配置虚拟环境优点创建虚拟环境Ubuntu 可能出现问题创建Django项目运行Django服务器创建应用项目 VS 应用配置应用配置数据库使用mysqlclient(官方推荐)1、通过[PYPI](https://pypi.org/)搜索mysqlclient2、通过[PYPI](https://pypi.org/)的安装步骤可知,我们需要先安装所需环境3、使用pip安装mysqlclient4、修改settings.py文件使用pym

m0_37623485的博客 336

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

ubuntu+Django+uwsgi+nginx+mysql 部署发布个人网站

如果没有服务器,可以先建个虚拟机ubuntu练练手(有服务器就跳过这步吧) https://blog.youkuaiyun.com/weixin_51063153/article/details/108763602 如何用XFTP传文件到ubuntu服务器 https://blog.youkuaiyun.com/weixin_51063153/article/details/108775240 Ubuntu20 如何安装mysql和 设置密码 https://blog.youkuaiyun.com/weixin_51063153/articl

weixin_51063153的博客 283

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

Ubuntu上 Django连接 Mysql(记录我踩的坑)

1、#查看有没有安装MySQL:dpkg -l |mysql2、 安装MySQL:3、检查是否安装成功:通过上述命令检查之后,如果看到有 mysql 的处于 LISTEN 状态则表示安装成功。4、登录mysql数据库可以通过如下命令:-u 表示选择登陆的用户名, -p 表示登陆的用户密码,提示:Access denied for user 'root'@'localhost'

在水一方 638

Ubuntu下django配置mysql

1、安装mysql和django,网上教程很多就不列举了。 2、进入mysql,新建一个数据库和测试用户。 终端进入mysql,mysql -u root -p ,然后输入密码就可以了。 create database django_db; create user 'django_user'@'127.0.0.1' identified by 'testdjango'; grant all

xunathan的专栏 1169

Ubuntu配置Django+ Apache2+ mysql

# 我的Ubuntu上自带的python3.5,所以安装一下 python3.6 sudo add-apt-repository ppa:jonathonf/python-3.6 sudo apt-get update sudo apt-get install python3.6 sudo update-alternatives --install /usr/bin/python3 pyt

caoliu1024cl的博客 3909

ubuntu django mysql_Ubuntu 14.04下Django+MySQL安装部署全过程

一、简要步骤。(阿里云Ubuntu14.04)DjangoMySQL的安装与配置记录一下我的部署过程,也方便一些有需要的童鞋,大神勿喷~二、Python的安装由于博主使用的环境是Ubuntu14.04,所以系统自带了Python2.7.6。我们可以使用Python –V查看自己Ubuntu中的Python版本。三、Django1、现在Django的版本已经到1.9.2了。我们可以到官网去下载,然后...

weixin_35414437的博客 248

Django的配置和链接mysql(Ubuntu)

Django的入门(一)Django的简介创建项目的虚拟环境开启一个虚拟环境:开始写迁移数据库文件:链接mysql Django的简介 MVT模式的介绍 创建项目的虚拟环境 本次使用的是pip安装 一、更新 sudo apt update 二、安装pip sudo apt install python3-pip 三、升级pip(可忽略) sudo python3 -m pip ins...

paul0926的博客 4241

Ubuntu下Django安装和mysql配置

1.用pip安装Django      这里我安装的是1.10.3版本     pip install Django==1.10.3     遇到错误  提示有pip的新版本 2.这里我们用pip install --upgrade pip 命令更新 pip 这里用pip install  --upgrade pip 命令也出现错误,一般这个错误是由于网速很慢导致

SkyTwx 1070

ubuntu django mysql_Ubuntu 14.04下Django和MySQL环境部署全过程

简要步骤。(Ubuntu14.04)Python安装DjangoMysql的安装与配置记录一下我的部署过程,也方便一些有需要的童鞋,大神勿喷~一、Python环境搭建操作系统Ubuntu14.04,自带Python2.7.6im@58user:/$ python Python 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4] on linu...

weixin_36299482的博客 129
上一篇: javacard 开发环境的搭建
下一篇: django redis memcached安装和配置
JohnaXu
博客等级 码龄15年 11粉丝 9原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值