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.
Created on 2012年05月08日 11:43 by vinay.sajip, last changed 2022年04月11日 14:57 by admin.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| copy_tcl.bat.txt | vinay.sajip, 2012年05月08日 22:00 | Batch file to copy Tcl/Tk DLLs to build directory | ||
| Messages (8) | |||
|---|---|---|---|
| msg160198 - (view) | Author: Vinay Sajip (vinay.sajip) * (Python committer) | Date: 2012年05月08日 11:43 | |
I'm now getting failures to import tkinter on Windows: C:\Users\Vinay\Projects\scratch>..\cpython\PCbuild\python tkhello.py Traceback (most recent call last): File "tkhello.py", line 1, in <module> from tkinter import * File "<frozen importlib._bootstrap>", line 977, in _find_and_load File "<frozen importlib._bootstrap>", line 596, in load_module File "<frozen importlib._bootstrap>", line 262, in module_for_loader_wrapper File "<frozen importlib._bootstrap>", line 484, in _load_module File "C:\Users\Vinay\Projects\cpython\lib\tkinter\__init__.py", line 36, in <module> from tkinter import _fix ImportError: cannot import name _fix I'm not sure if this is an importlib issue or a tkinter one, but with a recent build (30 April) this worked OK. The tkhello.py script is just from tkinter import * root = Tk() w = Label(root, text="Hello, world!") w.pack() root.mainloop() |
|||
| msg160201 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年05月08日 12:39 | |
For the record, the script works fine under Linux. Vinay, can you bisect and find out which revision introduced the issue? |
|||
| msg160207 - (view) | Author: Brian Curtin (brian.curtin) * (Python committer) | Date: 2012年05月08日 15:17 | |
Reproduced here as well. |
|||
| msg160218 - (view) | Author: Vinay Sajip (vinay.sajip) * (Python committer) | Date: 2012年05月08日 19:01 | |
I went back a fair way, and the failure still keeps happening. So now I'm wondering - is a Tk app *supposed* to work from a source build? I've verified that the test script works OK when run from an installed Python. So, this issue may be invalid, if we don't care about running Tk apps from a source build (if so, sorry for the noise) - or if we do care, then it's not an importlib issue, but Tk-related (I'm not a Tk expert by any means, so I'm not sure what needs to be done to make a Tk app work from a source build). |
|||
| msg160219 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年05月08日 19:03 | |
> I went back a fair way, and the failure still keeps happening. So now > I'm wondering - is a Tk app *supposed* to work from a source build? Does it work with 3.2? Did you try debugging at the prompt? e.g. looking what tkinter.__file__ is, etc. |
|||
| msg160223 - (view) | Author: Vinay Sajip (vinay.sajip) * (Python committer) | Date: 2012年05月08日 20:27 | |
> Does it work with 3.2? I'm not able to build 3.2 - make_buildinfo fails, seemingly because it can't find some Subversion-related files. I'll keep looking into it. |
|||
| msg160231 - (view) | Author: Vinay Sajip (vinay.sajip) * (Python committer) | Date: 2012年05月08日 22:00 | |
The test script works if tcl85.dll and tk85.dll are copied into the build directory. This can be done using a small batch file and the XML <Tool Name="VCPostBuildEventTool" CommandLine="copy_tcl $(tcltkDir)\bin" /> added to each build configuration in PCbuild\_tkinter.vcproj (can be added through the UI, of course). |
|||
| msg222665 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014年07月10日 13:40 | |
Presumably out of date as we're now on 3.5. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:30 | admin | set | github: 58955 |
| 2019年04月26日 18:50:26 | BreamoreBoy | set | nosy:
- BreamoreBoy |
| 2014年07月10日 13:41:57 | brian.curtin | set | nosy:
- brian.curtin |
| 2014年07月10日 13:40:15 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg222665 |
| 2012年05月08日 22:00:19 | vinay.sajip | set | files:
+ copy_tcl.bat.txt components: + Tkinter title: importlib fails with tkinter application on Windows -> Tkinter application doesn't run from source build on Windows keywords: + patch, needs review nosy: + gpolo, - brett.cannon messages: + msg160231 stage: patch review |
| 2012年05月08日 20:27:10 | vinay.sajip | set | messages: + msg160223 |
| 2012年05月08日 19:03:38 | pitrou | set | messages: + msg160219 |
| 2012年05月08日 19:01:25 | vinay.sajip | set | messages: + msg160218 |
| 2012年05月08日 15:17:23 | brian.curtin | set | messages: + msg160207 |
| 2012年05月08日 12:39:49 | pitrou | set | nosy:
+ brian.curtin, pitrou messages: + msg160201 |
| 2012年05月08日 11:43:28 | vinay.sajip | create | |