简体   繁体   中英

PyInstaller with multiple python files

I would like to make a program x.py into an executable(.exe) with Pyinstaller . I am able to do this just fine when x.py does not depend on any user scripts with:

python pyinstaller.py -w x.py

How can I make this work when I am importing another script I have written, y.py , into x.py ? I have tried using -p DIR to specify the path to y.py like so:

 python pyinstaller.py -p \projectfolder -w x.py

But that did not solve the issue.

I got this working by having the files in the same directory. My issue actually turned out to be with a known bug in pyinstaller with scipy. The solution to this was adding this import:

from scipy.sparse.csgraph import _validation  

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM