prompt-toolkit / pymux

A terminal multiplexer (like tmux) in Python
BSD 3-Clause "New" or "Revised" License
1.45k stars 82 forks source link

No module named ‘prompt_toolkit.key_binding.defaults’ #62

Closed kseistrup closed 7 years ago

kseistrup commented 7 years ago

Current pymux (announces itself as 0.13) cannot find prompt_toolkit.key_binding.defaults:

$ /usr/bin/pymux
Traceback (most recent call last):
  File "/usr/bin/pymux", line 11, in <module>
    load_entry_point('pymux==0.13', 'console_scripts', 'pymux')()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 560, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2642, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2296, in load
    return self.resolve()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2302, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3.6/site-packages/pymux/entry_points/run_pymux.py", line 28, in <module>
    from pymux.main import Pymux
  File "/usr/lib/python3.6/site-packages/pymux/main.py", line 21, in <module>
    from .key_bindings import KeyBindingsManager
  File "/usr/lib/python3.6/site-packages/pymux/key_bindings.py", line 7, in <module>
    from prompt_toolkit.key_binding.defaults import load_key_bindings, load_mouse_bindings
ModuleNotFoundError: No module named 'prompt_toolkit.key_binding.defaults'

and

$ cd /usr/lib/python3.6/site-packages/prompt_toolkit/key_binding/
$ find . -type f -name '*.py'
./__init__.py
./digraphs.py
./input_processor.py
./manager.py
./registry.py
./vi_state.py
./bindings/__init__.py
./bindings/basic.py
./bindings/completion.py
./bindings/emacs.py
./bindings/named_commands.py
./bindings/scroll.py
./bindings/utils.py
./bindings/vi.py

This is:

on ArchLinux.

Installed dependencies:

kseistrup commented 7 years ago

This seems to have been a bug in prompt_toolkit 1.0.9: Version 1.0.13 just landed in ArchLinux and pymux no longer exhibits this bug.