[GH-ISSUE #34] Import from another folder? #32

Closed
opened 2026-02-26 12:20:15 +03:00 by kerem · 2 comments
Owner

Originally created by @xzzh999 on GitHub (Nov 22, 2018).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/34

Hi~ nice work!
When i import a python file from another folder, it can build, but can't run, why?
how to fix this? btw, i use sys.path.append('./another_folder') to search the module.

Originally created by @xzzh999 on GitHub (Nov 22, 2018). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/34 Hi~ nice work! When i import a python file from another folder, it can build, but can't run, why? how to fix this? btw, i use ```sys.path.append('./another_folder')``` to search the module.
kerem closed this issue 2026-02-26 12:20:15 +03:00
Author
Owner

@brentvollebregt commented on GitHub (Nov 22, 2018):

If you explicitly use the import keyword to import, then PyInstaller will find you script and package it.

<!-- gh-comment-id:440971225 --> @brentvollebregt commented on GitHub (Nov 22, 2018): If you explicitly use the `import` keyword to import, then PyInstaller will find you script and package it.
Author
Owner

@xzzh999 commented on GitHub (Nov 22, 2018):

@brentvollebregt
thank you for your reply, after i set -p to that folder, it worked.

<!-- gh-comment-id:440978913 --> @xzzh999 commented on GitHub (Nov 22, 2018): @brentvollebregt thank you for your reply, after i set ```-p``` to that folder, it worked.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/auto-py-to-exe#32
No description provided.