jfcherng-sublime / ST-TodoReview

A SublimeText plugin for reviewing todo (and other) comments within your code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImportError: No module named 'typing'

finnito opened this issue · comments

Kia ora,

Thank you for your work on forking the original plugin and making it faster. It's great! I am having some trouble installing this plugin, however.

I've got all the files in the right place, but when I try and enable it I get the following:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 125, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.3/importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 584, in _check_name_wrapper
  File "<frozen importlib._bootstrap>", line 1022, in load_module
  File "<frozen importlib._bootstrap>", line 1003, in load_module
  File "<frozen importlib._bootstrap>", line 560, in module_for_loader_wrapper
  File "<frozen importlib._bootstrap>", line 868, in _load_module
  File "<frozen importlib._bootstrap>", line 313, in _call_with_frames_removed
  File "/Users/finnlesueur/Library/Application Support/Sublime Text 3/Packages/ST-TodoReview/boot.py", line 4, in <module>
    from .plugin.sublime_text.TodoReview import *
  File "/Users/finnlesueur/Library/Application Support/Sublime Text 3/Packages/ST-TodoReview/plugin/sublime_text/TodoReview.py", line 12, in <module>
    from typing import Any, Callable, Dict, Generator, Iterable, Iterator, List
ImportError: No module named 'typing'

I have python, python3(which is 3.8) both installed on my system and have done a python3 -m pip install typing. This seems to succeed but still get this error.

Any suggestions?

The latest release of this plugin doesn't support ST 3 (Python 3.3) because I've moved to ST 4 (Python 3.8) for almost 1 year. The typing module is a built-in as of Python 3.5, so I didn't add it into dependencies.json.

But I found that I didn't make it use too many ST 4 features so I make it supports ST 3 now.


By the way, please follow the install section in README unless you think you know how to deal with any problem that you may encounter. Since the plugin name in your log is ST-TodoReview, I am pretty sure you didn't follow it. (If you following it, you can't even see it in Package Control because your ST doesn't meet the version requirement)

ST plugin doesn't use ANY python things from your OS so it's irrelevant that how you setup your local python env(s).

Thank you for your response!

It will be because I'm using ST3. I tried to install it with your repository but was having trouble with that too (ST3 again), so I tried to go the git clone manual install.

I'll migrate to ST4 later today and see how I get on - although I imagine it'll all work smoothly ☺️

Thanks for the help!

Kia ora! You should be able to try it in ST 3. I did a basic test and it seemed working.

Hi,

It definitely wasn't working on ST3 - the plug-in wasn't showing up in the install list even with the repository added to my list.

But, no matter! I got ST4 and it is all working excellently.

Thanks for the help!