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

problems with osx sierra python3.5 tkinter #2665

Closed
danielepemy opened this issue Jun 24, 2017 · 6 comments
Closed

problems with osx sierra python3.5 tkinter #2665

danielepemy opened this issue Jun 24, 2017 · 6 comments

Comments

@danielepemy
Copy link

danielepemy commented Jun 24, 2017

Hi
I wrote the most simple script in python3.5
modules that I used:

import sys
import os 
from PIL import Image
import tkinter as tk
from tkinter import filedialog

(60 lines of code just to scale some images in a folder)

after running:
pyinstaller onmyscripy.py
everything looks ok I'm getting only warnings in the log. (tons of them)

57 INFO: PyInstaller: 3.2.1
58 INFO: Python: 3.5.3
74 INFO: Platform: Darwin-16.6.0-x86_64-i386-64bit

under mac os sierra

when I double click on the executable files under the dist folder I'm getting:

/Library/Frameworks/Python.framework/Versions/3.5/bin/dist/babuImageScale_v003/babuImageScale_v003 ; exit;
Traceback (most recent call last):
  File "babuImageScale_v003.py", line 10, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
    exec(bytecode, module.__dict__)
  File "tkinter/__init__.py", line 35, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/PyInstaller/loader/pyimod03_importers.py", line 573, in load_module
    module = loader.load_module(fullname)
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.5/bin/dist/babuImageScale_v003/_tkinter.so, 2): Library not loaded: @loader_path/Tcl
  Referenced from: /Library/Frameworks/Python.framework/Versions/3.5/bin/dist/babuImageScale_v003/_tkinter.so
  Reason: no suitable image found.  Did find:
	/Library/Frameworks/Python.framework/Versions/3.5/bin/dist/babuImageScale_v003/Tcl: not a file
	/Library/Frameworks/Python.framework/Versions/3.5/bin/dist/babuImageScale_v003/Tcl: not a file
Failed to execute script babuImageScale_v003
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

Any Idea ?
Am I doing something wrong ?

Cheers
Dani

@danielepemy danielepemy changed the title several errors including "Tcl not a file" problems with osx sierra python3.5 tkinter Jun 24, 2017
@Kasea
Copy link

Kasea commented Jun 27, 2017

Are you sure the image path is correct?

Reason: no suitable image found

Try running the file from the same spot as you would run your python script (assuming the python script is working), your image path is probaly not the same as in your compiled directory.

@danielepemy
Copy link
Author

The pythons script is working perfectly.
the image error I'm getting:

ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.5/bin/dist/babuImageScale_v003/_tkinter.so, 2): Library not loaded: @loader_path/Tcl Referenced from: /Library/Frameworks/Python.framework/Versions/3.5/bin/dist/babuImageScale_v003/_tkinter.so Reason: no suitable image found. Did find: /Library/Frameworks/Python.framework/Versions/3.5/bin/dist/babuImageScale_v003/Tcl: not a file /Library/Frameworks/Python.framework/Versions/3.5/bin/dist/babuImageScale_v003/Tcl: not a file Failed to execute script babuImageScale_v003

it is related to some issue with tkinter / tlc not copied or not used in the correct way by pyinstaller?

cheers
D

@SHxKM
Copy link

SHxKM commented Nov 6, 2017

@danielepemy did you manage to solve this? Im facing the same problem

@wuyi365
Copy link

wuyi365 commented Nov 14, 2017

Guys, some one has fixed this, you can have a try:#2969

@HarmPrinsDEX
Copy link

Hi, I had the same problem. I installed Python with Homebrew and after that installed pyinstaller, and it works like a dream. Thank you Homebrew!

@htgoebel
Copy link
Member

Stale since long, possible fixed in #2969, closing.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants