andreikop / enki

A text editor for programmers
http://enki-editor.org
GNU General Public License v2.0
161 stars 39 forks source link

pkg_resources.DistributionNotFound: The 'Sphinx' distribution was not… #429

Closed Osndok closed 6 years ago

Osndok commented 7 years ago

… found and is required by enki

andreikop commented 7 years ago

I'd like to leave Sphinx an optional dependency. Enki starts and works even if Sphinx is not installed. (or used to work in the past). What is the problem with Sphinx?

bjones1 commented 7 years ago

How did you install Enki to see this error? What OS and version of Enki? Sphinx should be optional, needed only if's enabled in the Settings | Setting menu.

Osndok commented 7 years ago

I got this message on both of my Fedora machines using the stock/packaged enki. As I recall, the older one was working until a certain upgrade (though exactly which or how long ago, I'm not sure), and "broke on it's own" until I installed the sphinx package.

andreikop commented 6 years ago

@Osndok , could you please paste the console session log which reproduces the problem?

Osndok commented 6 years ago

Sure, but it only prints the stack trace:

$ enki
Traceback (most recent call last):
  File "/usr/bin/enki", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2958, in <module>
    @_call_aside
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2944, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2971, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 635, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 943, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 829, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'Sphinx' distribution was not found and is required by enki

Is this what you wanted, or is there a way to get more information than this?

andreikop commented 6 years ago

bin/enki file in the repo looks different. It seems like Fedora had autogenerated some entry point. Probably the problem happened because Sphinx is listed in the setup.py requirements but not in rpm spec. @bjones1 , should we add Sphinx as rpm dependency or remove from the setup.py?

bjones1 commented 6 years ago

I would add it -- this makes it easier for users to use Sphinx, and is a fairly small install.

andreikop commented 6 years ago

Thanks, @Osndok!

Osndok commented 6 years ago

I'm glad I could help! I wouldn't want any new users turned away due to such a triviality....