monome / druid

terminal interface for crow
GNU General Public License v3.0
35 stars 16 forks source link

Fresh install of druid breaks with error ModuleNotFoundError: No module named 'prompt_toolkit.eventloop.defaults' #64

Closed sojastar closed 4 years ago

sojastar commented 4 years ago

Hi,

I just got my Crow and tried to install druid on my Mac and got this error message :

$ druid
Traceback (most recent call last):
  File "/usr/local/bin/druid", line 6, in <module>
    from druid.cli import cli
  File "/usr/local/lib/python3.7/site-packages/druid/cli.py", line 9, in <module>
    from druid import repl as druid_repl
  File "/usr/local/lib/python3.7/site-packages/druid/repl.py", line 8, in <module>
    from prompt_toolkit.eventloop.defaults import use_asyncio_event_loop
ModuleNotFoundError: No module named 'prompt_toolkit.eventloop.defaults'

Here is the installation log returned by pip3 :

Requirement already satisfied: monome-druid in /usr/local/lib/python3.7/site-packages (0.2.0)
Requirement already satisfied: setuptools in /usr/local/lib/python3.7/site-packages (from monome-druid) (40.8.0)
Requirement already satisfied: pyserial>=3.4 in /usr/local/lib/python3.7/site-packages (from monome-druid) (3.4)
Requirement already satisfied: setuptools-scm-git-archive in /usr/local/lib/python3.7/site-packages (from monome-druid) (1.1)
Requirement already satisfied: prompt-toolkit>=2.0.10 in /usr/local/lib/python3.7/site-packages (from monome-druid) (3.0.0)
Requirement already satisfied: setuptools-scm in /usr/local/lib/python3.7/site-packages (from monome-druid) (3.3.3)
Requirement already satisfied: Click>=7.0 in /usr/local/lib/python3.7/site-packages (from monome-druid) (7.0)
Requirement already satisfied: wcwidth in /usr/local/lib/python3.7/site-packages (from prompt-toolkit>=2.0.10->monome-druid) (0.1.7)

Could the problem come from prompt-toolkit 3.0 being installed instead of version 2.0 ? While looking into the error, I read version 3 has some change in the use of asyncio.

Thanks, Julien Jassaud

sojastar commented 4 years ago

Hi again,

Uninstalling prompt-toolkit 3.0 and replacing it with version 2.0.10 fixed the problem.

Julien Jassaud

csboling commented 4 years ago

It appears that prompt-toolkit 3.0.0 released on 11/24, so it's picking that incompatible dependency when trying to install prompt-toolkit >= 2.0.10. Thanks for the report!

csik commented 3 years ago

I'm running into this with the correct version of prompt-toolkit:

(venv) ➜ pip3 install --upgrade monome-druid

Requirement already satisfied: monome-druid in ./venv/lib/python3.8/site-packages (1.0.0) Collecting prompt-toolkit<3.0,>=2.0.10 Using cached prompt_toolkit-2.0.10-py3-none-any.whl (340 kB) Requirement already satisfied: setuptools-scm in ./venv/lib/python3.8/site-packages (from monome-druid) (6.0.1) Requirement already satisfied: setuptools-scm-git-archive in ./venv/lib/python3.8/site-packages (from monome-druid) (1.1) Requirement already satisfied: setuptools in ./venv/lib/python3.8/site-packages (from monome-druid) (56.0.0) Requirement already satisfied: Click>=7.0 in ./venv/lib/python3.8/site-packages (from monome-druid) (8.0.0) Requirement already satisfied: pyserial>=3.4 in ./venv/lib/python3.8/site-packages (from monome-druid) (3.5) Requirement already satisfied: six>=1.9.0 in ./venv/lib/python3.8/site-packages (from prompt-toolkit<3.0,>=2.0.10->monome-druid) (1.16.0) Requirement already satisfied: wcwidth in ./venv/lib/python3.8/site-packages (from prompt-toolkit<3.0,>=2.0.10->monome-druid) (0.2.5) Installing collected packages: prompt-toolkit Attempting uninstall: prompt-toolkit Found existing installation: prompt-toolkit 3.0.18 Uninstalling prompt-toolkit-3.0.18: Successfully uninstalled prompt-toolkit-3.0.18 Successfully installed prompt-toolkit-2.0.10

(venv) ➜ druid

Traceback (most recent call last): File "/usr/local/bin/druid", line 5, in from druid.cli import cli File "/usr/local/lib/python3.7/site-packages/druid/init.py", line 3, in from setuptools_scm import get_version ModuleNotFoundError: No module named 'setuptools_scm'