On 04/02/16 02:24, Adam Jensen wrote:
Is this a problem in the ports system or have I overlooked something?

Prelude:

hanzer:/home/hanzer:25$ pkg_info | grep -i tkinter
python-tkinter-2.7.10 tk GUI module for Python
python-tkinter-3.4.3 tk GUI module for Python

hanzer:/home/hanzer:26$ dmesg | head -n 2
OpenBSD 5.8-stable (GENERIC) #1: Sun Feb 28 17:25:17 EST 2016
     r...@minerva.bohemia.net:/usr/src/sys/arch/i386/compile/GENERIC


Happy:

hanzer:/home/hanzer:27$ python3.4
Python 3.4.3 (default, Mar  6 2016, 17:13:33)
[GCC 4.2.1 20070719 ] on openbsd5
Type "help", "copyright", "credits" or "license" for more information.
import tkinter
quit()


Fail:

hanzer:/home/hanzer:28$ python2.7
Python 2.7.10 (default, Feb 15 2016, 02:20:42)
[GCC 4.2.1 20070719 ] on openbsd5
Type "help", "copyright", "credits" or "license" for more information.
import tkinter
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
ImportError: No module named tkinter
quit()


Hello,

Tkinter has been renamed to tkinter in Python 3, so you should import 'Tkinter' in Python 2 (https://docs.python.org/2/library/tkinter.html).

Cheers,

Remi.

Reply via email to