windos下安装django
一:pip install Django
#
# script to register Python 2.0 or later for use with win32all
# and other extensions that require Python registry settings
#
# written by Joakim Loew for Secret Labs AB / PythonWare
#
# source:
# http://www.pythonware.com/products/works/articles/regpy20.htm
#
# modified by Valentine Gogichashvili as described in http://www.mail-archive.com/distutils-sig@python.org/msg10512.html import sys from _winreg import * # tweak as necessary
version = sys.version[:3]
installpath = sys.prefix regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version)
installkey = "InstallPath"
pythonkey = "PythonPath"
pythonpath = "%s;%s\\Lib\\;%s\\DLLs\\" % (
installpath, installpath, installpath
) def RegisterPy():
try:
reg = OpenKey(HKEY_CURRENT_USER, regpath)
except EnvironmentError as e:
try:
reg = CreateKey(HKEY_CURRENT_USER, regpath)
SetValue(reg, installkey, REG_SZ, installpath)
SetValue(reg, pythonkey, REG_SZ, pythonpath)
CloseKey(reg)
except:
print "*** Unable to register!"
return
print "--- Python", version, "is now registered!"
return
if (QueryValue(reg, installkey) == installpath and
QueryValue(reg, pythonkey) == pythonpath):
CloseKey(reg)
print "=== Python", version, "is already registered!"
return
CloseKey(reg)
print "*** Unable to register!"
print "*** You probably have another Python installation!" if __name__ == "__main__":
RegisterPy()
if sys.getdefaultencoding() != 'gbk':
reload(sys)
sys.setdefaultencoding('gbk')
convert = {
'__lt__': [('__gt__', lambda self, other: not (self < other or self == other)),
('__le__', lambda self, other: self < other or self == other),
('__ge__', lambda self, other: not self < other)],
'__le__': [('__ge__', lambda self, other: not self <= other or self == other),
('__lt__', lambda self, other: self <= other and not self == other),
('__gt__', lambda self, other: not self <= other)],
'__gt__': [('__lt__', lambda self, other: not (self > other or self == other)),
('__ge__', lambda self, other: self > other or self == other),
('__le__', lambda self, other: not self > other)],
'__ge__ ': [('__le__', lambda self, other: (not self >= other) or self == other),
('__gt__', lambda self, other: self >= other and not self == other),
('__lt__', lambda self, other: not self >= other)]
}
windos下安装django的更多相关文章
- 在centos下安装django
这里有一个不错的Django的学习资料.先收藏一下,以备后用.谢谢 http://www.ziqiangxuetang.com/django/django-install.html 在centos下安 ...
- Windows下安装Django【转】
Windows下安装Django及WEB服务启动 如果使用的是 Linux 或 Mac OS X ,系统可能已经预装了 Python .在命令提示符下 (或 OS X 的终端中) 输入python ...
- Linux下安装Django
Django是基于Python开发的免费的开源网站框架,也是python web开发中重量级的web框架,可以用于快速搭建高性能并且优雅的网站! 下面以Fedora为例安装Django,最新Fedor ...
- Windows下安装Django及WEB服务启动
如果使用的是 Linux 或 Mac OS X ,系统可能已经预装了 Python .在命令提示符下 (或 OS X 的终端中) 输入python ,如果出现python编辑环境,说明 ...
- win10下安装Django
Django的核心(1.4+)可以运行在从2.5到2.7之间的任何Python版本. 我的电脑是操作系统是window10 ,内存是4G. 1.下载django 官网地址:https://www.dj ...
- 在windows下安装Django
2013-07-24 21:23:30| 1.安装Python 我安装的是Python(x,y)-2.7.5.0,安装目录在C盘.安装成功后如下图所示. 2.安装Django 从https://w ...
- python3下安装Django
1.下载python3 https://www.Python.org/ 我下载的是Python3.5.1 选的 Windows x86-64 executable installer 2. 打开cmd ...
- Ubuntu下安装Django
正式开始Django学习历程.要用Django第一步就是要配置好环境啊. 我的配置: OS: Ubuntu 12.10 Server: Apache 2. ...
- Linux环境下安装Django和Python
1 下载前准备操作:安装相关的依赖库(工具包) yum install gcc patch libffi-devel python-devel zlib-devel bzip2-devel ...
随机推荐
- js 奇偶判断
function isOdd(num) { == ; } function isEven(num) { == ; } function isSane(num) { return isEven(num) ...
- 力扣(LeetCode)561. 数组拆分 I
给定长度为 2n 的数组, 你的任务是将这些数分成 n 对, 例如 (a1, b1), (a2, b2), ..., (an, bn) ,使得从1 到 n 的 min(ai, bi) 总和最大. 示例 ...
- Yahoo Programming Contest 2019 D - Ears
D - Ears 思路: s:起点 t:终点 l:左端点 r:右端点 以上称为关键点 dp[i][j]表示到位置 i 为止,已经经过前 j ...
- Luffy之支付宝支付开发API
发起支付 接入支付宝 支付的大致流程如下图: 部分节点详解: 沙箱环境 是支付宝提供给开发者的 ...
- eclipse添加js智能代码提示
安装重启之后,在项目名上右键 结束
- .NET学习日记【1】
不得不说,之前一年学习的内容基本上在第一章中都有所涉及,而且还讲了很多不知道知识.看完第一张对多态和继承都多了一些体会.在1.4前面的都有很认证的看过,也在vs上面验证了一下.然后也明白了.NET到底 ...
- CentOS 6快捷安装RabbitMQ教程
1.安装Erlang yum install erlang 2.安装RabbitMQ yum install rabbitmq-server 3.配置开机自启动 chkconfig rabbitmq- ...
- 5、Angular的一些其他核心特性,学习的主要模块
Angular应用程序的八个主要构造块: 模块 组件 模板 元数据 数据绑定 指令 服务 依赖注入 其他重要的Angular特性和服务: 动画 表单 HTTP 组件生命周期 管道过滤器 路由 测试
- 同时使用n和nvm踩到的坑
平时在公司的时候,一直只使用一个node版本.这两天想多了解下node的新版本,使用tj大神的 n 包管理工具来安装node包. 安装过程中一直难以容忍过慢的包下载速度,于是根据日志的描述直接把包下载 ...
- h5手机点击返回键,刷新页面
在js中,加上一下代码: window.onpageshow = function(event) {if (event.persisted) {window.location.reload();}};