Windows 7 64bit Python 2 Install
安装 setuptools 出现 UnicodeDecodeError
文件 Lib/mimetypes.py 中的 bug, 通过以下 patch 修复:
Index: Lib/mimetypes.py
===================================================================
--- Lib/mimetypes.py (revision )
+++ Lib/mimetypes.py (working copy)
@@ -, +, @@
import sys
import posixpath
import urllib
+from itertools import count
try:
import _winreg
except ImportError:
@@ -, +, @@
return def enum_types(mimedb):
- i =
- while True:
+ for i in count():
try:
- ctype = _winreg.EnumKey(mimedb, i)
+ yield _winreg.EnumKey(mimedb, i)
except EnvironmentError:
break
- try:
- ctype = ctype.encode(default_encoding) # omit in .x!
- except UnicodeEncodeError:
- pass
- else:
- yield ctype
- i += default_encoding = sys.getdefaultencoding()
with _winreg.OpenKey(_winreg.HKEY_CLASSES_ROOT,
error: Unable to find vcvarsall.bat
For Windows installations:
While running setup.py for package installations Python 2.7 searches for an installed Visual Studio 2008. You can trick Python to use a newer Visual Studio by setting the correct path in VS90COMNTOOLS environment variable before calling setup.py.
If you have Visual Studio 2010 installed, execute
SET VS90COMNTOOLS=%VS100COMNTOOLS%
or with Visual Studio 2012 installed (Visual Studio Version 11)
SET VS90COMNTOOLS=%VS110COMNTOOLS%
or with Visual Studio 2013 installed (Visual Studio Version 12)
SET VS90COMNTOOLS=%VS120COMNTOOLS%
Windows 7 64bit Python 2 Install的更多相关文章
- Windows 下安装Python包(Numpy)的错误:Unable to find vcvarsall.bat
情景简介: Windows 环境下安装Python2.7的Numpy扩展包时提示:error: Unable to find vcvarsall.bat 经过不懈的Google/Bing,发现不仅安装 ...
- windows下配置python库
安装easy_install: 下载ez_setup.py文件,命令行执行python ez_setup.py; 将python文件夹下的Scripts文件夹加入到系统path路径: 检查easy_i ...
- windows 10 64bit下安装Tensorflow+Keras+VS2015+CUDA8.0 GPU加速
原文地址:http://www.jianshu.com/p/c245d46d43f0 写在前面的话 2016年11月29日,Google Brain 工程师团队宣布在 TensorFlow 0.12 ...
- tensor搭建--windows 10 64bit下安装Tensorflow+Keras+VS2015+CUDA8.0 GPU加速
windows 10 64bit下安装Tensorflow+Keras+VS2015+CUDA8.0 GPU加速 原文见于:http://www.jianshu.com/p/c245d46d43f0 ...
- windows下面安装Python和pip终极教程
在大二的时候接触过一段时间的Python,最近又开始玩起了这门语言.总的来说,个 人很喜欢Python的语言风格,但是这门语言对于windows并不算很友好,因为如果是初学者在windows环境下安装 ...
- 【转】linux和windows下安装python集成开发环境及其python包
本系列分为两篇: 1.[转]windows和linux中搭建python集成开发环境IDE 2.[转]linux和windows下安装python集成开发环境及其python包 3.windows和l ...
- windows下安装python模块
如何在windows下安装python模块 1. 官网下载安装包,比如(pip : https://pypi.python.org/pypi/pip#downloads) pip-9.0.1.tar. ...
- 转: windows下面安装Python和pip终极教程
原文: http://www.cnblogs.com/yuanzm/p/4089856.html 因为如果是初学者在windows环境下安装,简直是折磨人,会遇到各种蛋疼的情况.本文希望提供傻瓜式的教 ...
- windows下安装python和依赖包的利器——Anaconda
在windows下安装python和很多依赖包,安装起来略为痛苦,可以使用python的大整合包——Anaconda Anaconda下载地址: http://continuum.io/downloa ...
随机推荐
- MySQL会创建临时表的几种情况
1.UNION查询: 2.用到TEMPTABLE算法或者是UNION查询中的视图: 3.ORDER BY和GROUP BY的子句不一样时: 4.表连接中,ORDER BY的列不是驱动表中的:(指定了联 ...
- Codeforces 454D - Little Pony and Harmony Chest
454D - Little Pony and Harmony Chest 思路: 状压dp,由于1的时候肯定满足题意,而ai最大是30,所以只要大于等于59都可以用1替换,所以答案在1到59之间 然后 ...
- 20170731xlVba根据数据表和模板表生成新表
Public Sub SplitData() Dim Wb As Workbook Dim Sht As Worksheet Dim NewSht As Worksheet Dim arr As Va ...
- 想3分钟搭建图像识别系统?这里有一份TensorFlow速成教程(转)
http://www.voidcn.com/article/p-wyaahqji-dr.html 从我们见到的各种图像识别软件来看,机器似乎能认出人脸.猫.狗.花草.各种汽车等等日常生活中出现的物体, ...
- unittest参数化
我们在写case的时候,如果用例的操作是一样的,就是参数不同,比如说要测一个登陆的接口,要测正常登陆的.黑名单用户登陆的.账号密码错误的等等,在unittest里面就要写多个case来测试. 这样的情 ...
- 秒杀多线程第五篇 经典线程同步 关键段CS
本文首先介绍下如何使用关键段,然后再深层次的分析下关键段的实现机制与原理. 关键段CRITICAL_SECTION一共就四个函数,使用很是方便.下面是这四个函数的原型和使用说明. 函数功能:初始化 函 ...
- linux--多进程进行文件拷贝
学习IO的时候,我们都曾经利用文件IO函数,标准IO函数都实现了对文件的拷贝, 对某一个文件进行拷贝时,我们可以考虑一下几种方式: a.单进程拷贝: 假设某一文件需要拷贝100字节,每一个时间片可以完 ...
- UVA-10539 Almost Prime Numbers
题目大意:这道题中给了一种数的定义,让求在某个区间内的这种数的个数.这种数的定义是:有且只有一个素因子的合数. 题目分析:这种数的实质是素数的至少两次幂.由此打表——打出最大区间里的所有这种数构成的表 ...
- After reading a picture than out a picture
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletExcepti ...
- 变形CSS3
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head> < ...