This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Windows "embedded" Python downloads are malformed
Type: Stage: resolved
Components: Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder: Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'
View: 35596
Assigned To: steve.dower Nosy List: njs, steve.dower, xtreak
Priority: normal Keywords:

Created on 2019-01-08 10:28 by njs, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg333217 - (view) Author: Nathaniel Smith (njs) * (Python committer) Date: 2019-01-08 10:28
~$ unzip -l /tmp/python-3.7.2-embed-amd64.zip 
Archive:  /tmp/python-3.7.2-embed-amd64.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
    99856  2018-12-23 23:10   python.exe
    98320  2018-12-23 23:10   pythonw.exe
  3780624  2018-12-23 23:09   python37.dll
    58896  2018-12-23 23:10   python3.dll
    85232  2018-12-10 22:06   vcruntime140.dll
   200208  2018-12-23 23:10   pyexpat.pyd
    26640  2018-12-23 23:10   select.pyd
  1073168  2018-12-23 23:10   unicodedata.pyd
    28688  2018-12-23 23:10   winsound.pyd
    71184  2018-12-23 23:10   _asyncio.pyd
    89104  2018-12-23 23:10   _bz2.pyd
    22544  2018-12-23 23:10   _contextvars.pyd
   133136  2018-12-23 23:10   _ctypes.pyd
   267792  2018-12-23 23:10   _decimal.pyd
   209424  2018-12-23 23:10   _elementtree.pyd
    38928  2018-12-23 23:10   _hashlib.pyd
   257040  2018-12-23 23:10   _lzma.pyd
    39440  2018-12-23 23:10   _msi.pyd
    29200  2018-12-23 23:10   _multiprocessing.pyd
    44048  2018-12-23 23:10   _overlapped.pyd
    27664  2018-12-23 23:10   _queue.pyd
    75792  2018-12-23 23:10   _socket.pyd
    85520  2018-12-23 23:10   _sqlite3.pyd
   123408  2018-12-23 23:10   _ssl.pyd
  2480296  2018-12-23 22:20   libcrypto-1_1-x64.dll
   523944  2018-12-23 22:20   libssl-1_1-x64.dll
  1190416  2018-12-23 23:10   sqlite3.dll
    85232  2018-12-10 22:06   vcruntime140.dll
  2386539  2018-12-23 23:14   python37.zip
       79  2018-12-23 23:14   python37._pth
---------                     -------
 13632362                     30 files

Notice that "vcruntime140.dll" appears twice on this list, once near the top and once near the bottom.

If we try to unpack this using the powershell Expand-Archive command, it fails with:

Failed to create file 'D:\a\1\s\python-dir\vcruntime140.dll' while expanding the archive file 
'D:\a\1\s\python.zip' contents as the file 'D:\a\1\s\python-dir\vcruntime140.dll' already exists. Use the -Force 
parameter if you want to overwrite the existing directory 'D:\a\1\s\python-dir\vcruntime140.dll' contents when 
expanding the archive file.

Probably it would be better to only include one copy of vcruntime140.dll :-)
msg333218 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2019-01-08 10:32
Seems this is fixed as part of related issue issue35596
msg333220 - (view) Author: Nathaniel Smith (njs) * (Python committer) Date: 2019-01-08 10:39
You're right, good catch!
History
Date User Action Args
2022-04-11 14:59:10adminsetgithub: 79865
2019-01-08 10:46:07xtreaksetsuperseder: Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'
stage: resolved
2019-01-08 10:39:44njssetresolution: duplicate -> fixed
superseder: Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' -> (no value)
messages: + msg333220
stage: resolved -> (no value)
2019-01-08 10:37:30serhiy.storchakasetstatus: open -> closed
resolution: duplicate
superseder: Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'
stage: resolved
2019-01-08 10:32:41xtreaksetnosy: + xtreak
messages: + msg333218
2019-01-08 10:28:52njscreate