Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
439 views
in Technique[技术] by (71.8m points)

python - How to zip a pyinstaller bundle on OneDrive

python version = 3.8.5
pyinstaller version = 4.1
Jedi version = 0.17.1
powershell version = 5.1

I have a program which works fine both before and after running Pyinstaller and bundling to a single folder. The problem is that when I try to zip the folder on OneDrive, using Powershell (compress-archive), I get the following message:

ZipArchiveHelper : Could not find a part of the path 'C:pathomypyinstallerfolderjedihird_partyypeshedhird_party2a
nd3
equestspackagesurllib3packagesssl_match_hostname\_implementation.pyi'.

I can zip and unzip the bundle successfully off of OneDrive, however, in addition to not being able to zip the files on OneDrive, if I zip the folder, unzip it, then sync the unzipped folder with OneDrive, it creates invalid reparse points (also within the Jedi folder) which cannot be deleted without admin privileges.

The problem seems to stem from the Jedi module which as far as I can tell is an essential part of bundling with Pyinstaller (I could be wrong on this point). I had a look at their (Jedi) GitHub page and there were a couple of issues listed regarding support for zipfiles here: https://github.com/davidhalter/jedi/issues/1207 and here: https://github.com/davidhalter/jedi/pull/745 but they seem to have been closed a couple of years ago and what they're discussing is a little beyond my understanding. It also doesn't seem to present a solution that I can use.

I have gone into the above path in my bundle and the file is definitely there. Has anyone seen this before? Does anyone have any idea what might be stopping it from zipping on OneDrive? Is anyone else able to zip pyinstaller folders on OneDrive? Should I submit this as a bug to jedi/ pyinstaller?

Can anyone tell me what the Jedi folder is needed for and if there's any chance my program would run without it? (Main modules my program uses are Pandas, Numpy, and TkInter. As well as re, os, pathlib, difflib, datetime, functools, collections, traceback, inspect, pyperclip.)

question from:https://stackoverflow.com/questions/65885327/how-to-zip-a-pyinstaller-bundle-on-onedrive

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...