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: Cannot import modules out of zip file with extended-length path on windows
Type: behavior Stage:
Components: Interpreter Core, Windows Versions: Python 3.4, Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Chris Moore, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2015-12-28 22:12 by Chris Moore, last changed 2022-04-11 14:58 by admin.

Messages (1)
msg257136 - (view) Author: Chris Moore (Chris Moore) Date: 2015-12-28 22:12
To reproduce, put a python module in a zip file (I have been using wheels but I assume any module in a zip file will have the same error?) , add the absolute extended-length path to sys.path (add '\\\\?\\' to the front of the normal absolute path, so '\\\\?\\c:\\Users\\cc\\test.zip' instead of 'c:\\Users\\cc\\test.zip'), then attempt to import a module that is contained in the zip file.

I have seen this issue so far on 3.4.3 and 3.5.1.  I have not tested 3.4.4 yet.

Adding directories that are extended-length paths to sys.path does allow importing modules contained in those directories, and of course using a non extended-length path to a zip file works as long as that path contains less than 260 characters.
History
Date User Action Args
2022-04-11 14:58:25adminsetgithub: 70156
2015-12-28 22:12:42Chris Moorecreate