Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows "embedded" Python downloads are malformed #79865

Closed
njsmith opened this issue Jan 8, 2019 · 3 comments
Closed

Windows "embedded" Python downloads are malformed #79865

njsmith opened this issue Jan 8, 2019 · 3 comments
Assignees

Comments

@njsmith
Copy link
Contributor

njsmith commented Jan 8, 2019

BPO 35684
Nosy @njsmith, @zooba, @tirkarthi
Superseder
  • bpo-35596: Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/zooba'
    closed_at = <Date 2019-01-08.10:37:30.952>
    created_at = <Date 2019-01-08.10:28:52.681>
    labels = []
    title = 'Windows "embedded" Python downloads are malformed'
    updated_at = <Date 2019-01-08.10:46:07.146>
    user = 'https://github.com/njsmith'

    bugs.python.org fields:

    activity = <Date 2019-01-08.10:46:07.146>
    actor = 'xtreak'
    assignee = 'steve.dower'
    closed = True
    closed_date = <Date 2019-01-08.10:37:30.952>
    closer = 'serhiy.storchaka'
    components = []
    creation = <Date 2019-01-08.10:28:52.681>
    creator = 'njs'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35684
    keywords = []
    message_count = 3.0
    messages = ['333217', '333218', '333220']
    nosy_count = 3.0
    nosy_names = ['njs', 'steve.dower', 'xtreak']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = '35596'
    type = None
    url = 'https://bugs.python.org/issue35684'
    versions = []

    @njsmith
    Copy link
    Contributor Author

    njsmith commented Jan 8, 2019

    ~$ 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 :-)

    @tirkarthi
    Copy link
    Member

    Seems this is fixed as part of related issue bpo-35596

    @njsmith
    Copy link
    Contributor Author

    njsmith commented Jan 8, 2019

    You're right, good catch!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants