Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83634
| Date | 2015-01-12 20:52 +0000 |
|---|---|
| From | Tim Golden <mail@timgolden.me.uk> |
| Subject | Re: I must be missing something obvious in installing Python 3.4.2... |
| References | <ec7b8633-3b02-42b3-89e4-ef002ebd78e6@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.17640.1421095928.18130.python-list@python.org> (permalink) |
On 12/01/2015 18:02, Andrew Koenig wrote:
> Downloaded and installed 64-bit Python 3.4 and pywin32-219. Both installed smoothly on my 64-bit Win7 machine. I added C:\Python34 to the search path.
>
> If I launch a Windows command window and run
>
> python -m ensurepip
>
> I get the following:
>
> Ignoring indexes: https://pypi.python.org/simple/
> Downloading/unpacking setuptools
> Cleaning up...
> Exception:
> Traceback (most recent call last):
> File "C:\Users\ark\AppData\Local\Temp\tmpe3ckts9f\pip-1.5.6-py2.py3-none-any.w
> hl\pip\basecommand.py", line 122, in main
> status = self.run(options, args)
> File "C:\Users\ark\AppData\Local\Temp\tmpe3ckts9f\pip-1.5.6-py2.py3-none-any.w
> hl\pip\commands\install.py", line 278, in run
> requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundl
> e=self.bundle)
> File "C:\Users\ark\AppData\Local\Temp\tmpe3ckts9f\pip-1.5.6-py2.py3-none-any.w
> hl\pip\req.py", line 1177, in prepare_files
> url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
> File "C:\Users\ark\AppData\Local\Temp\tmpe3ckts9f\pip-1.5.6-py2.py3-none-any.w
> hl\pip\index.py", line 209, in find_requirement
> file_locations, url_locations = self._sort_locations(locations)
> File "C:\Users\ark\AppData\Local\Temp\tmpe3ckts9f\pip-1.5.6-py2.py3-none-any.w
> hl\pip\index.py", line 128, in _sort_locations
> sort_path(os.path.join(path, item))
> File "C:\Users\ark\AppData\Local\Temp\tmpe3ckts9f\pip-1.5.6-py2.py3-none-any.w
> hl\pip\index.py", line 109, in sort_path
> if mimetypes.guess_type(url, strict=False)[0] == 'text/html':
> File "C:\Python34\lib\mimetypes.py", line 287, in guess_type
> init()
> File "C:\Python34\lib\mimetypes.py", line 348, in init
> db.read_windows_registry()
> File "C:\Python34\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
Ouch! That looks like another variation on a bug of which we've fixed at
least two variations to do with reading mimetypes from the Windows
registry. Can you see what the following code produces, please:
<code>
import winreg as _winreg
hkcr = _winreg.OpenKey(_winreg.HKEY_CLASSES_ROOT, "")
with open("classes.txt", "w") as f:
i = 0
while True:
try:
ctype = _winreg.EnumKey(hkcr, i)
except EnvironmentError:
break
else:
f.write("%s -> %r\n" % (type(ctype), ctype))
i += 1
</code>
TJG
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
I must be missing something obvious in installing Python 3.4.2... Andrew Koenig <ark@acm.org> - 2015-01-12 10:02 -0800
Re: I must be missing something obvious in installing Python 3.4.2... Chris Angelico <rosuav@gmail.com> - 2015-01-13 05:36 +1100
Re: I must be missing something obvious in installing Python 3.4.2... Andrew Koenig <ark@acm.org> - 2015-01-12 12:51 -0800
Re: I must be missing something obvious in installing Python 3.4.2... Tim Golden <mail@timgolden.me.uk> - 2015-01-12 20:52 +0000
Re: I must be missing something obvious in installing Python 3.4.2... Andrew Koenig <ark@acm.org> - 2015-01-12 13:45 -0800
Re: I must be missing something obvious in installing Python 3.4.2... Tim Golden <mail@timgolden.me.uk> - 2015-01-12 22:00 +0000
Re: I must be missing something obvious in installing Python 3.4.2... Andrew Koenig <ark@acm.org> - 2015-01-12 14:35 -0800
Re: I must be missing something obvious in installing Python 3.4.2... Andrew Koenig <ark@acm.org> - 2015-01-12 15:12 -0800
Re: I must be missing something obvious in installing Python 3.4.2... Tim Golden <mail@timgolden.me.uk> - 2015-01-13 06:08 +0000
Re: I must be missing something obvious in installing Python 3.4.2... cjgohlke@gmail.com - 2015-01-12 23:05 -0800
Re: I must be missing something obvious in installing Python 3.4.2... Tim Golden <mail@timgolden.me.uk> - 2015-01-13 08:18 +0000
csiph-web