- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
osx 10.13.1
Reproducible example (Using Python 3.6.3 |Intel Corporation| (default, Oct 16 2017, 10:30:26))
import tkinter tkinter._test()
Result
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/intel/intelpython3/lib/python3.6/tkinter/__init__.py", line 3982, in _test
root = Tk()
File "/opt/intel/intelpython3/lib/python3.6/tkinter/__init__.py", line 2019, in __init__
self._loadtk()
File "/opt/intel/intelpython3/lib/python3.6/tkinter/__init__.py", line 2034, in _loadtk
% (_tkinter.TK_VERSION, tk_version))
RuntimeError: tk.h version (8.6) doesn't match libtk.a version (8.5)
I tried installing tk 8.6 but the error persists. I have the following folders
/System/Library/Frameworks/Tk.framework/Versions/8.5
/Library/Frameworks/Tk.framework/Versions/8.6
This was causing matplotlib to not function properly, my temporary solution was to add the following line
matplotlib.use('Qt5Agg')
Other Python distributions in my computer work ok with Tk 8.5
Ссылка скопирована
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Hi Fabian,
Intel Python includes its own copy of Tk in /opt/intel/intelpython3/lib, so there must be something in your environment that's preferring the system Tk. Can you try unsetting environment variables like DYLD_LIBRARY_PATH? Also you can run `env | grep Tk` to see if anything in your environment is pointing to the system Tk. To debug the library loading, you can set DYLD_PRINT_LIBRARIES. As a last resort, `export DYLD_LIBRARY_PATH=/opt/intel/intelpython3/lib` would likely work around the error.
Please let me know what you discover.
Chris
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Hi CHris thanks for the help
1. Unsetting DYLD_LIBRARY_PATH: Same error
2. env | grep Tk: No results
3. set DYLD_PRINT_LIBRARIES: Same error
4. export DYLD_LIBRARY_PATH=/opt/intel/intelpython3/lib: Different error shows
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/intel/intelpython3/lib/python3.6/tkinter/__init__.py", line 36, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: dlopen(/opt/intel/intelpython3/lib/python3.6/lib-dynload/_tkinter.cpython-36m-darwin.so, 2): Symbol not found: __cg_png_create_info_struct
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /opt/intel/intelpython3/lib/libPng.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Note I have the file /opt/intel/intelpython3/lib/libpng.dylib (Without the capital P as in the error)
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Just a note to say that I can reproduce this too. Exact same behaviour on macOS 10.13.3 & Intel Python 2018 Update 1. I ran "conda update --all" but it didn't help. I also tried creating symlinks from wish and tclsh to wish8.6 and tclsh8.6 respectively in the bin directory, but that didn't help either. And running
import tkinter
tkinter.Tcl().eval('info patchlevel')
outputs
'8.5.9'
which is the Apple version.
Are there any plans to fix it?
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
After running "conda update --all" tkinter works fine now. I presume it was the update of one of the "intelpython", "tcl" or "tk" packages in the past few days/weeks. Thanks for fixing it.
- Подписка на RSS-канал
- Отметить тему как новую
- Отметить тему как прочитанную
- Выполнить отслеживание данной Тема для текущего пользователя
- Закладка
- Подписаться
- Страница в формате печати