python3.x安装setuptool出现openkey() argument 2 must...解决方法
来源:互联网 发布:深圳海关数据 编辑:程序博客网 时间:2024/06/03 18:32
我的python3.4.1安装setuptool的时候出现了像这样的错误
Traceback (most recent call last): File "setup.py", line 17, in <module> exec(init_file.read(), command_ns) File "<string>", line 8, in <module> File "C:\Users\tim\Desktop\setuptools-2.0.2\setuptools\__init__.py", line 11, in <module> from setuptools.extension import Extension File "C:\Users\tim\Desktop\setuptools-2.0.2\setuptools\extension.py", line 5, in <module> from setuptools.dist import _get_unpatched File "C:\Users\tim\Desktop\setuptools-2.0.2\setuptools\dist.py", line 15, in <module> from setuptools.compat import numeric_types, basestring File "C:\Users\tim\Desktop\setuptools-2.0.2\setuptools\compat.py", line 49, in <module> from http.server import HTTPServer, SimpleHTTPRequestHandler File "C:\Python\lib\http\server.py", line 654, in <module> class SimpleHTTPRequestHandler(BaseHTTPRequestHandler): File "C:\Python\lib\http\server.py", line 839, in SimpleHTTPRequestHandler mimetypes.init() # try to read system mime.types File "C:\Python\lib\mimetypes.py", line 348, in init db.read_windows_registry() File "C:\Python\lib\mimetypes.py", line 255, in read_windows_registry with _winreg.OpenKey(hkcr, subkeyname) as subkey:TypeError: OpenKey() argument 2 must be str without null characters or None, not str
可以看到出现错误的文件是mimetypes.py这个
我的解决方法就是下载个python2.7,然后,将里面的mimetypes.py替换掉python3.4的mimetypes.py,然后稍微改改让它的语法通过,然后就安装成功了哈哈。
这个是我修改后的mimetypes.py可以在python3.x用的文件,替换前记得先备份该文件
下载地址:http://pan.baidu.com/s/1qWuK4lY
0 0
- python3.x安装setuptool出现openkey() argument 2 must...解决方法
- windows下安装setuptool
- 安装easy_install,setuptool
- Python3.x安装后还是Python2.x的解决方法
- RHEL6.2安装出现“sda must have a GPT disk label ”解决方法
- Magento安装出现<PHP Extension "curl" must be loaded>解决方法
- WINDOWS安装python3.X遇到的错误解决方法
- 安装pip和setuptool源码
- NodeJs TypeError: First argument must be file descriptor解决方法
- python3.x Linux安装
- mac安装Python3.x
- Windows7x64安装Python3.x
- centos 安装 python3.x
- python3 pycurl 出现 TypeError: string argument expected, got 'bytes' 解决方案
- Python3.x中出现 "AttributeError: module 'urllib' has no attribute 'urlopen'" 的解决方法
- python3-网络编程-TypeError: send() argument 1 must be bytes or buffer, not str异常
- CentOS升级Python3.x.x后安装pip出现command not found 错误
- 2、Swift出现Missing argument label 'XX:'in call 错误的解决方法
- elasticsearch 开始 —— 安装
- flex+struts2上传文件
- C++中的const 引用
- MySql在建立索引优化时需要注意的问题
- convertall release 6.0基于python: unit conversion
- python3.x安装setuptool出现openkey() argument 2 must...解决方法
- 专访许鹏:谈C程序员修养及大型项目源码阅读与学习
- 树的定义和基本概念
- detertdrt
- Log4j笔记
- 数据结构-----最长回文子串
- PHP中的ob_start用法详解
- 排序算法之堆排序
- C++输入操作符>> 输出操作符<<重载