Closed datamaskinen closed 5 years ago
hmm strange it works perfectly to start it with : lector/main.py
Thanks for a wonderful work
You're probably installing with python2. Which I assume is what Kubuntu has linked for python
. Running it with __main__.py
uses python 3. If you want to install systemwide, I'd recommend going $ python3 setup.py build
etc.
That said, you're welcome.
~/opt/lector/Lector$ sudo python setup.py install running install running build running build_py running egg_info writing requirements to lector.egg-info/requires.txt writing lector.egg-info/PKG-INFO writing top-level names to lector.egg-info/top_level.txt writing dependency_links to lector.egg-info/dependency_links.txt writing entry points to lector.egg-info/entry_points.txt reading manifest file 'lector.egg-info/SOURCES.txt' writing manifest file 'lector.egg-info/SOURCES.txt' running install_lib creating /usr/local/lib/python2.7/dist-packages/lector copying build/lib.linux-x86_64-2.7/lector/database.py -> /usr/local/lib/python2.7/dist-packages/lector creating /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/init.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/compatibility_utils.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/mobi_nav.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/mobi_pagemap.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/mobi_uncompress.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/unpack_structure.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/mobi_dict.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/unipath.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/kindleunpack.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/mobi_k8proc.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/mobi_html.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/mobi_index.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/mobi_cover.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/mobi_header.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/mobi_opf.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/mobiml2xhtml.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/mobi_ncx.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/mobi_k8resc.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/mobi_sectioner.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/mobi_split.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/KindleUnpack/mobi_utils.py -> /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack copying build/lib.linux-x86_64-2.7/lector/init.py -> /usr/local/lib/python2.7/dist-packages/lector copying build/lib.linux-x86_64-2.7/lector/delegates.py -> /usr/local/lib/python2.7/dist-packages/lector copying build/lib.linux-x86_64-2.7/lector/annotations.py -> /usr/local/lib/python2.7/dist-packages/lector creating /usr/local/lib/python2.7/dist-packages/lector/parsers copying build/lib.linux-x86_64-2.7/lector/parsers/init.py -> /usr/local/lib/python2.7/dist-packages/lector/parsers copying build/lib.linux-x86_64-2.7/lector/parsers/comicbooks.py -> /usr/local/lib/python2.7/dist-packages/lector/parsers copying build/lib.linux-x86_64-2.7/lector/parsers/pdf.py -> /usr/local/lib/python2.7/dist-packages/lector/parsers copying build/lib.linux-x86_64-2.7/lector/parsers/fb2.py -> /usr/local/lib/python2.7/dist-packages/lector/parsers copying build/lib.linux-x86_64-2.7/lector/parsers/mobi.py -> /usr/local/lib/python2.7/dist-packages/lector/parsers copying build/lib.linux-x86_64-2.7/lector/parsers/epub.py -> /usr/local/lib/python2.7/dist-packages/lector/parsers copying build/lib.linux-x86_64-2.7/lector/settingsdialog.py -> /usr/local/lib/python2.7/dist-packages/lector copying build/lib.linux-x86_64-2.7/lector/library.py -> /usr/local/lib/python2.7/dist-packages/lector copying build/lib.linux-x86_64-2.7/lector/sorter.py -> /usr/local/lib/python2.7/dist-packages/lector creating /usr/local/lib/python2.7/dist-packages/lector/readers copying build/lib.linux-x86_64-2.7/lector/readers/init.py -> /usr/local/lib/python2.7/dist-packages/lector/readers copying build/lib.linux-x86_64-2.7/lector/readers/read_epub.py -> /usr/local/lib/python2.7/dist-packages/lector/readers copying build/lib.linux-x86_64-2.7/lector/readers/read_fb2.py -> /usr/local/lib/python2.7/dist-packages/lector/readers copying build/lib.linux-x86_64-2.7/lector/contentwidgets.py -> /usr/local/lib/python2.7/dist-packages/lector copying build/lib.linux-x86_64-2.7/lector/settings.py -> /usr/local/lib/python2.7/dist-packages/lector copying build/lib.linux-x86_64-2.7/lector/widgets.py -> /usr/local/lib/python2.7/dist-packages/lector copying build/lib.linux-x86_64-2.7/lector/metadatadialog.py -> /usr/local/lib/python2.7/dist-packages/lector creating /usr/local/lib/python2.7/dist-packages/lector/resources copying build/lib.linux-x86_64-2.7/lector/resources/init.py -> /usr/local/lib/python2.7/dist-packages/lector/resources creating /usr/local/lib/python2.7/dist-packages/lector/resources/raw copying build/lib.linux-x86_64-2.7/lector/resources/raw/lector.desktop -> /usr/local/lib/python2.7/dist-packages/lector/resources/raw copying build/lib.linux-x86_64-2.7/lector/resources/raw/Lector.png -> /usr/local/lib/python2.7/dist-packages/lector/resources/raw copying build/lib.linux-x86_64-2.7/lector/resources/settingswindow.py -> /usr/local/lib/python2.7/dist-packages/lector/resources copying build/lib.linux-x86_64-2.7/lector/resources/about.html -> /usr/local/lib/python2.7/dist-packages/lector/resources copying build/lib.linux-x86_64-2.7/lector/resources/definitions.py -> /usr/local/lib/python2.7/dist-packages/lector/resources copying build/lib.linux-x86_64-2.7/lector/resources/pie_chart.py -> /usr/local/lib/python2.7/dist-packages/lector/resources copying build/lib.linux-x86_64-2.7/lector/resources/annotationswindow.py -> /usr/local/lib/python2.7/dist-packages/lector/resources copying build/lib.linux-x86_64-2.7/lector/resources/resources.py -> /usr/local/lib/python2.7/dist-packages/lector/resources copying build/lib.linux-x86_64-2.7/lector/resources/mainwindow.py -> /usr/local/lib/python2.7/dist-packages/lector/resources copying build/lib.linux-x86_64-2.7/lector/resources/metadata.py -> /usr/local/lib/python2.7/dist-packages/lector/resources copying build/lib.linux-x86_64-2.7/lector/threaded.py -> /usr/local/lib/python2.7/dist-packages/lector copying build/lib.linux-x86_64-2.7/lector/models.py -> /usr/local/lib/python2.7/dist-packages/lector copying build/lib.linux-x86_64-2.7/lector/main.py -> /usr/local/lib/python2.7/dist-packages/lector copying build/lib.linux-x86_64-2.7/lector/guifunctions.py -> /usr/local/lib/python2.7/dist-packages/lector copying build/lib.linux-x86_64-2.7/lector/definitionsdialog.py -> /usr/local/lib/python2.7/dist-packages/lector copying build/lib.linux-x86_64-2.7/lector/toolbars.py -> /usr/local/lib/python2.7/dist-packages/lector creating /usr/local/lib/python2.7/dist-packages/lector/rarfile copying build/lib.linux-x86_64-2.7/lector/rarfile/init.py -> /usr/local/lib/python2.7/dist-packages/lector/rarfile copying build/lib.linux-x86_64-2.7/lector/rarfile/rarfile.py -> /usr/local/lib/python2.7/dist-packages/lector/rarfile copying build/lib.linux-x86_64-2.7/lector/rarfile/dumprar.py -> /usr/local/lib/python2.7/dist-packages/lector/rarfile byte-compiling /usr/local/lib/python2.7/dist-packages/lector/database.py to database.pyc File "/usr/local/lib/python2.7/dist-packages/lector/database.py", line 63 self.database.execute(f"CREATE TABLE books ({column_string})") ^ SyntaxError: invalid syntax
byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/init.py to init.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/compatibility_utils.py to compatibility_utils.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/mobi_nav.py to mobi_nav.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/mobi_pagemap.py to mobi_pagemap.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/mobi_uncompress.py to mobi_uncompress.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/unpack_structure.py to unpack_structure.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/mobi_dict.py to mobi_dict.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/unipath.py to unipath.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/kindleunpack.py to kindleunpack.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/mobi_k8proc.py to mobi_k8proc.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/mobi_html.py to mobi_html.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/mobi_index.py to mobi_index.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/mobi_cover.py to mobi_cover.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/mobi_header.py to mobi_header.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/mobi_opf.py to mobi_opf.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/mobiml2xhtml.py to mobiml2xhtml.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/mobi_ncx.py to mobi_ncx.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/mobi_k8resc.py to mobi_k8resc.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/mobi_sectioner.py to mobi_sectioner.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/mobi_split.py to mobi_split.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/KindleUnpack/mobi_utils.py to mobi_utils.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/init.py to init.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/delegates.py to delegates.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/annotations.py to annotations.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/parsers/init.py to init.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/parsers/comicbooks.py to comicbooks.pyc File "/usr/local/lib/python2.7/dist-packages/lector/parsers/comicbooks.py", line 76 contents = [(f'Page {count + 1}', i) for count, i in enumerate(self.image_list)] ^ SyntaxError: invalid syntax
byte-compiling /usr/local/lib/python2.7/dist-packages/lector/parsers/pdf.py to pdf.pyc File "/usr/local/lib/python2.7/dist-packages/lector/parsers/pdf.py", line 88 contents = [(f'Page {i + 1}', i) for i in range(self.book.numPages())] ^ SyntaxError: invalid syntax
byte-compiling /usr/local/lib/python2.7/dist-packages/lector/parsers/fb2.py to fb2.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/parsers/mobi.py to mobi.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/parsers/epub.py to epub.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/settingsdialog.py to settingsdialog.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/library.py to library.pyc File "/usr/local/lib/python2.7/dist-packages/lector/library.py", line 135 tooltip_string = f'{title} \n{author_string}: {author} \n{year_string}: {str(year)}' ^ SyntaxError: invalid syntax
byte-compiling /usr/local/lib/python2.7/dist-packages/lector/sorter.py to sorter.pyc File "/usr/local/lib/python2.7/dist-packages/lector/sorter.py", line 175 print(f'{os.path.basename(filename)} is already in database') ^ SyntaxError: invalid syntax
byte-compiling /usr/local/lib/python2.7/dist-packages/lector/readers/init.py to init.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/readers/read_epub.py to read_epub.pyc File "/usr/local/lib/python2.7/dist-packages/lector/readers/read_epub.py", line 61 print(f'{str(filename)} not found in {short_filename}') ^ SyntaxError: invalid syntax
byte-compiling /usr/local/lib/python2.7/dist-packages/lector/readers/read_fb2.py to read_fb2.pyc File "/usr/local/lib/python2.7/dist-packages/lector/readers/read_fb2.py", line 105 image_string = f'<image l:href="#{image_name}"' ^ SyntaxError: invalid syntax
byte-compiling /usr/local/lib/python2.7/dist-packages/lector/contentwidgets.py to contentwidgets.pyc File "/usr/local/lib/python2.7/dist-packages/lector/contentwidgets.py", line 347 f'{extension_string} (.png .jpg *.bmp)') ^ SyntaxError: invalid syntax
byte-compiling /usr/local/lib/python2.7/dist-packages/lector/settings.py to settings.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/widgets.py to widgets.pyc File "/usr/local/lib/python2.7/dist-packages/lector/widgets.py", line 710 f'{images_string} ({image_files})')[0] ^ SyntaxError: invalid syntax
byte-compiling /usr/local/lib/python2.7/dist-packages/lector/metadatadialog.py to metadatadialog.pyc File "/usr/local/lib/python2.7/dist-packages/lector/metadatadialog.py", line 104 tooltip_string = f'{title} \n{author_string}: {author} \n{year_string}: {str(year)}' ^ SyntaxError: invalid syntax
byte-compiling /usr/local/lib/python2.7/dist-packages/lector/resources/init.py to init.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/resources/settingswindow.py to settingswindow.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/resources/definitions.py to definitions.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/resources/pie_chart.py to pie_chart.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/resources/annotationswindow.py to annotationswindow.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/resources/resources.py to resources.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/resources/mainwindow.py to mainwindow.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/resources/metadata.py to metadata.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/threaded.py to threaded.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/models.py to models.pyc File "/usr/local/lib/python2.7/dist-packages/lector/models.py", line 176 return f'{d}d' ^ SyntaxError: invalid syntax
byte-compiling /usr/local/lib/python2.7/dist-packages/lector/main.py to main.pyc File "/usr/local/lib/python2.7/dist-packages/lector/main.py", line 491 f'{ebooks_string} ({self.available_parsers})') ^ SyntaxError: invalid syntax
byte-compiling /usr/local/lib/python2.7/dist-packages/lector/guifunctions.py to guifunctions.pyc File "/usr/local/lib/python2.7/dist-packages/lector/guifunctions.py", line 30 icon_path = f':/images/{icon_theme}/{image_name}.svg' ^ SyntaxError: invalid syntax
byte-compiling /usr/local/lib/python2.7/dist-packages/lector/definitionsdialog.py to definitionsdialog.pyc File "/usr/local/lib/python2.7/dist-packages/lector/definitionsdialog.py", line 94 self.pronounceButton.setToolTip(f'Pronounce "{word_root}"') ^ SyntaxError: invalid syntax
byte-compiling /usr/local/lib/python2.7/dist-packages/lector/toolbars.py to toolbars.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/rarfile/init.py to init.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/rarfile/rarfile.py to rarfile.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/lector/rarfile/dumprar.py to dumprar.pyc running install_data creating /usr/local/share/icons creating /usr/local/share/icons/hicolor creating /usr/local/share/icons/hicolor/scalable creating /usr/local/share/icons/hicolor/scalable/apps copying lector/resources/raw/Lector.png -> /usr/local/share/icons/hicolor/scalable/apps creating /usr/local/share/applications copying lector/resources/raw/lector.desktop -> /usr/local/share/applications running install_egg_info Copying lector.egg-info to /usr/local/lib/python2.7/dist-packages/lector-0.4.1.egg-info running install_scripts Installing lector script to /usr/local/bin writing list of installed files to 'install.txt'
################ ~$ lector Traceback (most recent call last): File "/usr/local/bin/lector", line 11, in
load_entry_point('lector==0.4.1', 'gui_scripts', 'lector')()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 480, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2693, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2324, in load
return self.resolve()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2330, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/local/lib/python2.7/dist-packages/lector/main.py", line 491
f'{ebooks_string} ({self.available_parsers})')
^
SyntaxError: invalid syntax