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 ...
随机推荐
- Harbor私有仓库中如何彻底删除镜像释放存储空间?
简介: Harbor私有仓库运行一段时间后,仓库中存有大量镜像,会占用太多的存储空间.直接通过Harbor界面删除相关镜像,并不会自动删除存储中的文件和镜像.需要停止Harbor服务,执行垃圾回收命令 ...
- [MySQL]配置多个MySQL服务(Windows)
配置多个MySQL服务 1.复制原解压好的MySQL文件到本目录下,且改名为MySQL2 2.修改MySQL2文件夹中的my.ini 修改my.ini文件中的以下内容,并保存文件: [client] ...
- (15)线程---Condition条件
功能:也是通过阻塞控制线程数量.类似信号量\进程池\线程池的作用 语法:wait from threading import Condition con= Condition() conn.acq ...
- Probability和Likelihood的区别
Bayes for Beginners: Probability and Likelihood 好好看,非常有用. 以前死活都不理解Probability和Likelihood的区别,为什么这两个东西 ...
- 【分布式搜索引擎】Elasticsearch分布式架构原理
一.相关概念介绍 1)集群(cluster) 一个集群(cluster)由一个或多个节点组成. 这些节点具有相同的cluster.name,它们协同工作,分享数据和负载.当加入新的节点或者删除一个节点 ...
- 做h5动画会用到的一个很好的缓动算法库
http://www.zhangxinxu.com/wordpress/2016/12/how-use-tween-js-animation-easing/
- MogonDB安装及配置
1.下载地址:https://www.mongodb.com/download-center/community?jmp=docs 选择下载MSI文件类型 2.双击安装 此处如勾选,则会影响安装速度, ...
- HBuild 连接苹果手机
PC.苹果手机.数据线 1.在电脑端安装iTunes,安装完成之后提示重启. 2.用数据线连接苹果手机 PC 3.打开HBuild 菜单栏 --> 运行 --> 真机 ...
- 5、SAMBA服务二:配置实例
①:SAMBA服务一:参数详解 ②:SAMBA服务二:配置实例 5.2.3.Samba共享目录配置实例 1.允许匿名用户读取/it共享目录,修改/etc/samba/smb.conf,在最后添加以下内 ...
- hdu6129 Just Do It!
多校时找规律做过... 题意,给你一个数列a[1], a[2], a[3], a[4], ... , a[n],操作一次后变为a[1], a[1] ^ a[2], a[1] ^ a[2] ^ a[3] ...