python创建虚拟环境失败_VirtualEnv:在win7中创建虚拟环境失败

在Windows7系统中尝试使用Python的virtualenv创建虚拟环境时遇到错误,具体表现为在下载和安装setuptools过程中抛出异常。错误追踪显示与pip的索引处理、文件类型识别及Windows注册表相关,可能原因是pip版本问题或系统注册表文件缺失。
摘要由CSDN通过智能技术生成

刚把python,pip和virtualenv安装在我的windows7机器上。在

在创建虚拟环境时遇到了以下问题:

virtualenv test给了我:------------------------------------------------------------

-c run on 09/18/14 00:24:25

Ignoring indexes: https://pypi.python.org/simple/

Downloading/unpacking setuptools

Cleaning up...

Removing temporary dir C:\Users\Han\test\build...

Exception:

Traceback (most recent call last):

File "c:\python27\lib\site-packages\virtualenv_support\pip-1.5.6-py2.py3-none-any.whl\pip\basecommand.py", line 122, in main

status = self.run(options, args)

File "c:\python27\lib\site-packages\virtualenv_support\pip-1.5.6-py2.py3-none-any.whl\pip\commands\install.py", line 278, in run

requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)

File "c:\python27\lib\site-packages\virtualenv_support\pip-1.5.6-py2.py3-none-any.whl\pip\req.py", line 1177, in prepare_files

url = finder.find_requirement(req_to_install, upgrade=self.upgrade)

File "c:\python27\lib\site-packages\virtualenv_support\pip-1.5.6-py2.py3-none-any.whl\pip\index.py", line 209, in find_requirement

file_locations, url_locations = self._sort_locations(locations)

File "c:\python27\lib\site-packages\virtualenv_support\pip-1.5.6-py2.py3-none-any.whl\pip\index.py", line 128, in _sort_locations

sort_path(os.path.join(path, item))

File "c:\python27\lib\site-packages\virtualenv_support\pip-1.5.6-py2.py3-none-any.whl\pip\index.py", line 109, in sort_path

if mimetypes.guess_type(url, strict=False)[0] == 'text/html':

File "c:\python27\Lib\mimetypes.py", line 287, in guess_type

init()

File "c:\python27\Lib\mimetypes.py", line 348, in init

db.read_windows_registry()

File "c:\python27\Lib\mimetypes.py", line 256, in read_windows_registry

with _winreg.OpenKey(hkcr, subkeyname) as subkey:

WindowsError: [Error 2] The system cannot find the file specified

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值