persepolisdm / persepolis

Persepolis Download Manager is a GUI for aria2.
https://persepolisdm.github.io
GNU General Public License v3.0
6.19k stars 651 forks source link

Wrong python environment path #712

Open omidsa1 opened 4 years ago

omidsa1 commented 4 years ago

System Details:

Traceback (most recent call last): File "/usr/bin/persepolis", line 6, in from pkg_resources import load_entry_point File "/home/omid/anaconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 3241, in @_call_aside File "/home/omid/anaconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 3225, in _call_aside f(*args, kwargs) File "/home/omid/anaconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 3254, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/home/omid/anaconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 583, in _build_master ws.require(requires) File "/home/omid/anaconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 900, in require needed = self.resolve(parse_requirements(requirements)) File "/home/omid/anaconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 786, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'persepolis==3.2.0' distribution was not found and is required by the application**

From the log, python can't assert that Persepolis exists! So I took a look at executable at /usr/bin/persepolis and it revealed python path was set to that of my anaconda installation (#!/home/omid/anaconda3/bin/python3.7).

Finally changing it to /usr/bin/python3.7 solved the problem and Persepolis Started Successfully.

alireza-amirsamimi commented 4 years ago

Hello Persepolis uses python setup tools for installation. Python-setup-tools creates that file in bin folder automatically. Do you change anything in your python settings or ...?

crimx commented 4 years ago

I suffer the same issue after a system upgrade on Manjaro. Don't know what went wrong.

Traceback (most recent call last):
  File "/usr/bin/persepolis", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3252, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'persepolis==3.2.0' distribution was not found and is required by the application

This is my /usr/bin/persepolis

#!/usr/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'persepolis==3.2.0','console_scripts','persepolis'
__requires__ = 'persepolis==3.2.0'
import re
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(
        load_entry_point('persepolis==3.2.0', 'console_scripts', 'persepolis')()
    )
ghost commented 4 years ago

@crimx It seems that Manjaro recently switched to Python 3.8 and you must rebuild persepolis package to make it work with new python version. It's not related to persepolis but all python packages must rebuild again after every new python version come along. just rebuild it, and it would be fine again.

crimx commented 4 years ago

Thanks! Confirm worked after a fresh reinstall.

ghost commented 4 years ago

@crimx You're welcome