Skip to content

Cannot be imported without tkinter #77

@jgosmann

Description

@jgosmann

The nengo-extras import fails if Python is not installed with tkinter. Can we fix this and have a release quickly? I'd like to use nengo-extras in my tutorial on Friday, but I am afraid that participants might run into this problem without any quick way to fix it due to a variety environments.

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-170-cae318af19f6> in <module>()
----> 1 import nengo_extras

~/Library/Python/3.6/lib/python/site-packages/nengo_extras/__init__.py in <module>()
      5 from .convnet import Conv2d, Pool2d
      6 from .neurons import FastLIF, SoftLIFRate
----> 7 from . import (
      8     camera, data, dists, graphviz, gui, networks, neurons, probe, vision)
      9 

~/Library/Python/3.6/lib/python/site-packages/nengo_extras/data.py in <module>()
      9 import numpy as np
     10 
---> 11 from .compat import pickle_load_bytes, urlretrieve
     12 
     13 

~/Library/Python/3.6/lib/python/site-packages/nengo_extras/compat.py in <module>()
      9     from io import StringIO
     10     from urllib.request import urlretrieve
---> 11     import tkinter
     12 
     13 

/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/__init__.py in <module>()
     34 import sys
     35 
---> 36 import _tkinter # If this fails your Python may not be configured for Tk
     37 TclError = _tkinter.TclError
     38 from tkinter.constants import *

ModuleNotFoundError: No module named '_tkinter'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions