prompt-toolkit / pyvim

Pure Python Vim clone.
BSD 3-Clause "New" or "Revised" License
2.53k stars 163 forks source link

cant run in windows #142

Closed golam71 closed 1 year ago

golam71 commented 3 years ago

it causes a error in startup

C:\Users\pro>pyvim
Traceback (most recent call last):
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 2798, in get_entry_map
    ep_map = self._ep_map
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 2756, in __getattr__
    raise AttributeError(attr)
AttributeError: _ep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python37\Scripts\pyvim.exe\__main__.py", line 9, in <module>
  File "c:\python37\lib\site-packages\pyvim\entry_points\run_pyvim.py", line 34, in run
    editor = Editor()
  File "c:\python37\lib\site-packages\pyvim\editor.py", line 80, in __init__
    self.styles = generate_built_in_styles()
  File "c:\python37\lib\site-packages\pyvim\style.py", line 37, in generate_built_in_styles
    return dict((name, get_editor_style_by_name(name)) for name in get_all_styles())
  File "c:\python37\lib\site-packages\pyvim\style.py", line 37, in <genexpr>
    return dict((name, get_editor_style_by_name(name)) for name in get_all_styles())
  File "c:\python37\lib\site-packages\pygments\styles\__init__.py", line 88, in get_all_styles
    for name, _ in find_plugin_styles():
  File "c:\python37\lib\site-packages\pygments\plugin.py", line 63, in find_plugin_styles
    for entrypoint in iter_entry_points(STYLE_ENTRY_POINT):
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 656, in <genexpr>
    for entry in dist.get_entry_map(group).values()
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 2801, in get_entry_map
    self._get_metadata('entry_points.txt'), self
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 2499, in parse_map
    raise ValueError("Entry points must be listed in groups")
ValueError: Entry points must be listed in groups
jonathanslenders commented 2 years ago

I'm not sure what went wrong here. It's supposed to run fine on Windows. (But it's some time ago that I tried running it on Windows.)

clach04 commented 1 year ago

@golam71 I'm late to the party here but I can confirm this works for me under Windows with:

I integrated this into my encrypted notes viewer/editor/search tool https://github.com/clach04/puren_tonbo/issues/34

golam71 commented 1 year ago

I suppose it was because of python 3.7