Daniel Reetz, the founder of the DIY Book Scanner community, has recently started making videos of prototyping and shop tips. If you are tinkering with a book scanner (or any other project) in your home shop, these tips will come in handy. https://www.youtube.com/channel/UCn0gq8 ... g_8K1nfInQ

Spreads on Linux Mint: First Impressions

General discussion about software packages and releases, new software you've found, and threads by programmers and script writers.
User avatar
daniel_reetz
Posts: 2786
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Spreads on Linux Mint: First Impressions

Post by daniel_reetz » 05 Sep 2013, 01:42

Subtitle: Daniel doesn't know what the hell he's doing but tries anyway!

So, I had another thread where I mistakenly tried to get Spreads working on Windows. For now, that's off the table. I'm now going to try to get it working on Linux Mint, which is a nice, clean distribution of Linux based on Ubuntu, which is in turn based on Debian.

I pulled up a Terminal window and typed

Code: Select all

$ pip install spreads
- Linux Mint helpfully told me to install PIP first:
prompt.png
seemed to go OK.
pipinstalled.png
Now back to where I started:

Code: Select all

$ pip install spreads
spreadsinstalled.png
Seemed to go OK.

Hmm, maybe not so OK. It doesn't seem to think that Spreads is installed.
notinstalled.png
Odd. Here's the log:

Code: Select all

fake@fake-IX270 ~ $ sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  build-essential dpkg-dev g++ g++-4.7 libalgorithm-diff-perl
  libalgorithm-diff-xs-perl libalgorithm-merge-perl libstdc++6-4.7-dev
  python-setuptools
Suggested packages:
  debian-keyring g++-multilib g++-4.7-multilib gcc-4.7-doc libstdc++6-4.7-dbg
  libstdc++6-4.7-doc
Recommended packages:
  python-dev-all
The following NEW packages will be installed:
  build-essential dpkg-dev g++ g++-4.7 libalgorithm-diff-perl
  libalgorithm-diff-xs-perl libalgorithm-merge-perl libstdc++6-4.7-dev
  python-pip python-setuptools
0 upgraded, 10 newly installed, 0 to remove and 200 not upgraded.
Need to get 11.0 MB of archives.
After this operation, 30.0 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://archive.ubuntu.com/ubuntu/ raring/main libstdc++6-4.7-dev i386 4.7.3-1ubuntu1 [1,705 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ raring/main g++-4.7 i386 4.7.3-1ubuntu1 [7,760 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ raring/main g++ i386 4:4.7.3-1ubuntu10 [1,456 B]
Get:4 http://archive.ubuntu.com/ubuntu/ raring/main dpkg-dev all 1.16.10ubuntu1 [712 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ raring/main build-essential i386 11.6ubuntu4 [5,654 B]
Get:6 http://archive.ubuntu.com/ubuntu/ raring/main libalgorithm-diff-perl all 1.19.02-3 [50.0 kB]
Get:7 http://archive.ubuntu.com/ubuntu/ raring/main libalgorithm-diff-xs-perl i386 0.04-2build3 [13.1 kB]
Get:8 http://archive.ubuntu.com/ubuntu/ raring/main libalgorithm-merge-perl all 0.08-2 [12.7 kB]
Get:9 http://archive.ubuntu.com/ubuntu/ raring/main python-setuptools all 0.6.34-0ubuntu1 [454 kB]
Get:10 http://archive.ubuntu.com/ubuntu/ raring/universe python-pip all 1.3.1-0ubuntu1 [240 kB]
Fetched 11.0 MB in 22s (491 kB/s)                                              
Selecting previously unselected package libstdc++6-4.7-dev:i386.
(Reading database ... 142186 files and directories currently installed.)
Unpacking libstdc++6-4.7-dev:i386 (from .../libstdc++6-4.7-dev_4.7.3-1ubuntu1_i386.deb) ...
Selecting previously unselected package g++-4.7.
Unpacking g++-4.7 (from .../g++-4.7_4.7.3-1ubuntu1_i386.deb) ...
Selecting previously unselected package g++.
Unpacking g++ (from .../g++_4%3a4.7.3-1ubuntu10_i386.deb) ...
Selecting previously unselected package dpkg-dev.
Unpacking dpkg-dev (from .../dpkg-dev_1.16.10ubuntu1_all.deb) ...
Selecting previously unselected package build-essential.
Unpacking build-essential (from .../build-essential_11.6ubuntu4_i386.deb) ...
Selecting previously unselected package libalgorithm-diff-perl.
Unpacking libalgorithm-diff-perl (from .../libalgorithm-diff-perl_1.19.02-3_all.deb) ...
Selecting previously unselected package libalgorithm-diff-xs-perl.
Unpacking libalgorithm-diff-xs-perl (from .../libalgorithm-diff-xs-perl_0.04-2build3_i386.deb) ...
Selecting previously unselected package libalgorithm-merge-perl.
Unpacking libalgorithm-merge-perl (from .../libalgorithm-merge-perl_0.08-2_all.deb) ...
Selecting previously unselected package python-setuptools.
Unpacking python-setuptools (from .../python-setuptools_0.6.34-0ubuntu1_all.deb) ...
Selecting previously unselected package python-pip.
Unpacking python-pip (from .../python-pip_1.3.1-0ubuntu1_all.deb) ...
Processing triggers for man-db ...
Setting up libstdc++6-4.7-dev:i386 (4.7.3-1ubuntu1) ...
Setting up g++-4.7 (4.7.3-1ubuntu1) ...
Setting up g++ (4:4.7.3-1ubuntu10) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up dpkg-dev (1.16.10ubuntu1) ...
Setting up build-essential (11.6ubuntu4) ...
Setting up libalgorithm-diff-perl (1.19.02-3) ...
Setting up libalgorithm-diff-xs-perl (0.04-2build3) ...
Setting up libalgorithm-merge-perl (0.08-2) ...
Setting up python-setuptools (0.6.34-0ubuntu1) ...
Setting up python-pip (1.3.1-0ubuntu1) ...
fake@fake-IX270 ~ $ pip install spreads
Downloading/unpacking spreads
  Downloading spreads-0.3.3.tar.gz (2.9MB): 2.9MB downloaded
  Running setup.py egg_info for package spreads
    
Downloading/unpacking colorama>=0.2.5 (from spreads)
  Downloading colorama-0.2.5.tar.gz
  Running setup.py egg_info for package colorama
    
Downloading/unpacking pyusb>=1.0.0a3 (from spreads)
  Downloading pyusb-1.0.0a3.tar.gz (40kB): 40kB downloaded
  Running setup.py egg_info for package pyusb
    
Downloading/unpacking pyptpchdk>=0.2.1 (from spreads)
  Downloading pyptpchdk-0.2.1.tar.gz (84kB): 84kB downloaded
  Running setup.py egg_info for package pyptpchdk
    
Downloading/unpacking PyYAML>=3.10 (from spreads)
  Downloading PyYAML-3.10.tar.gz (241kB): 241kB downloaded
  Running setup.py egg_info for package PyYAML
    
Downloading/unpacking Wand>=0.3.1 (from spreads)
  Downloading Wand-0.3.3.tar.gz (40kB): 40kB downloaded
  Running setup.py egg_info for package Wand
    
Downloading/unpacking stevedore>=0.9.1 (from spreads)
  Downloading stevedore-0.11.tar.gz (338kB): 338kB downloaded
  Running setup.py egg_info for package stevedore
    
    warning: no files found matching '*.html' under directory 'docs'
    warning: no files found matching '*.css' under directory 'docs'
    warning: no files found matching '*.js' under directory 'docs'
    warning: no files found matching '*.png' under directory 'docs'
    warning: no files found matching '*.py' under directory 'tests'
Downloading/unpacking futures>=2.1.4 (from spreads)
  Downloading futures-2.1.4.tar.gz
  Running setup.py egg_info for package futures
    
Downloading/unpacking pexif>=0.13 (from spreads)
  Downloading pexif-0.13.tar.gz (169kB): 169kB downloaded
  Running setup.py egg_info for package pexif
    
Requirement already satisfied (use --upgrade to upgrade): Pillow>=2.0.0 in /usr/lib/python2.7/dist-packages (from spreads)
Installing collected packages: spreads, colorama, pyusb, pyptpchdk, PyYAML, Wand, stevedore, futures, pexif
  Running setup.py install for spreads
    
    changing mode of build/scripts-2.7/spread from 644 to 755
    error: could not create '/usr/local/lib/python2.7/dist-packages/spreadsplug': Permission denied
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-fake/spreads/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-jAfRX6-record/install-record.txt --single-version-externally-managed:
    running install

running build

running build_py

creating build

creating build/lib.linux-i686-2.7

creating build/lib.linux-i686-2.7/spreads

copying spreads/__init__.py -> build/lib.linux-i686-2.7/spreads

copying spreads/confit.py -> build/lib.linux-i686-2.7/spreads

copying spreads/util.py -> build/lib.linux-i686-2.7/spreads

copying spreads/workflow.py -> build/lib.linux-i686-2.7/spreads

copying spreads/cli.py -> build/lib.linux-i686-2.7/spreads

copying spreads/plugin.py -> build/lib.linux-i686-2.7/spreads

creating build/lib.linux-i686-2.7/spreadsplug

copying spreadsplug/__init__.py -> build/lib.linux-i686-2.7/spreadsplug

copying spreadsplug/combine.py -> build/lib.linux-i686-2.7/spreadsplug

copying spreadsplug/tesseract.py -> build/lib.linux-i686-2.7/spreadsplug

copying spreadsplug/colorcorrect.py -> build/lib.linux-i686-2.7/spreadsplug

copying spreadsplug/autorotate.py -> build/lib.linux-i686-2.7/spreadsplug

copying spreadsplug/djvubind.py -> build/lib.linux-i686-2.7/spreadsplug

copying spreadsplug/pdfbeads.py -> build/lib.linux-i686-2.7/spreadsplug

copying spreadsplug/scantailor.py -> build/lib.linux-i686-2.7/spreadsplug

creating build/lib.linux-i686-2.7/spreadsplug/dev

copying spreadsplug/dev/__init__.py -> build/lib.linux-i686-2.7/spreadsplug/dev

copying spreadsplug/dev/chdkcamera.py -> build/lib.linux-i686-2.7/spreadsplug/dev

running egg_info

writing requirements to spreads.egg-info/requires.txt

writing spreads.egg-info/PKG-INFO

writing top-level names to spreads.egg-info/top_level.txt

writing dependency_links to spreads.egg-info/dependency_links.txt

writing entry points to spreads.egg-info/entry_points.txt

warning: manifest_maker: standard file '-c' not found



reading manifest file 'spreads.egg-info/SOURCES.txt'

writing manifest file 'spreads.egg-info/SOURCES.txt'

copying spreads/config_default.yaml -> build/lib.linux-i686-2.7/spreads

creating build/lib.linux-i686-2.7/spreadsplug/gui

copying spreadsplug/gui/__init__.py -> build/lib.linux-i686-2.7/spreadsplug/gui

copying spreadsplug/gui/gui.py -> build/lib.linux-i686-2.7/spreadsplug/gui

copying spreadsplug/gui/gui.qrc -> build/lib.linux-i686-2.7/spreadsplug/gui

copying spreadsplug/gui/gui_rc.py -> build/lib.linux-i686-2.7/spreadsplug/gui

creating build/lib.linux-i686-2.7/spreadsplug/gui/pixmaps

copying spreadsplug/gui/pixmaps/monk.png -> build/lib.linux-i686-2.7/spreadsplug/gui/pixmaps

running build_scripts

creating build/scripts-2.7

copying and adjusting spread -> build/scripts-2.7

changing mode of build/scripts-2.7/spread from 644 to 755

running install_lib

creating /usr/local/lib/python2.7/dist-packages/spreadsplug

error: could not create '/usr/local/lib/python2.7/dist-packages/spreadsplug': Permission denied

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-fake/spreads/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-jAfRX6-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-fake/spreads
Storing complete log in /home/fake/.pip/pip.log
fake@fake-IX270 ~ $
OK, I see a few errors in there, but I'm just going to try installing as it asks... Nope, doesn't work. I'll come back to this in a bit. Feels like user error or a permissions error or something to me. Doubt there's anything wrong with Spreads... gonna go read the Spreads main thread.

User avatar
daniel_reetz
Posts: 2786
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Re: Spreads on Linux Mint: First Impressions

Post by daniel_reetz » 05 Sep 2013, 01:46

(now following the instructions HERE http://spreads.readthedocs.org/en/lates ... stallation line by line)

User avatar
daniel_reetz
Posts: 2786
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Re: Spreads on Linux Mint: First Impressions

Post by daniel_reetz » 05 Sep 2013, 02:27

Now tinkering with these lines...

Code: Select all

$ wget <scantailor-deb-url>
$ sudo dpkg -i <scantailor-deb>
$ sudo gem install pdfbeads
$ wget http://djvubind.googlecode.com/files/djvubind_1.2.1.deb
$ sudo dpkg -i djvubind_1.2.1.deb
$ virtualenv ~/.spreads
$ source ~/.spreads/bin/activate
$ pip install spreads

User avatar
daniel_reetz
Posts: 2786
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Re: Spreads on Linux Mint: First Impressions

Post by daniel_reetz » 05 Sep 2013, 02:31

Closer!

Code: Select all

(.spreads)fake@fake-IX270 ~ $ spreads gui
No command 'spreads' found, did you mean:
 Command 'spread' from package 'spread' (universe)
spreads: command not found
(.spreads)fake@fake-IX270 ~ $ spread
You are missing a dependency for one of your enabled plugins:
Could not find executable `pdfbeads` in $PATH. Please install the appropriate package(s)!
(.spreads)fake@fake-IX270 ~ $ 

User avatar
daniel_reetz
Posts: 2786
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Re: Spreads on Linux Mint: First Impressions

Post by daniel_reetz » 05 Sep 2013, 02:33

Code: Select all

(.spreads)fake@fake-IX270 ~ $ sudo gem install pdfbeads
[sudo] password for fake: 
Fetching: pdfbeads-1.0.9.gem (100%)
Successfully installed pdfbeads-1.0.9
1 gem installed
Installing ri documentation for pdfbeads-1.0.9...
Installing RDoc documentation for pdfbeads-1.0.9...
(.spreads)fake@fake-IX270 ~ $ spread
usage: spread [-h] [--verbose]
              {configure,capture,download,postprocess,output,wizard} ...
spread: error: too few arguments
Yay. So close I can taste it. Now to enable the GUI...

User avatar
daniel_reetz
Posts: 2786
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Re: Spreads on Linux Mint: First Impressions

Post by daniel_reetz » 05 Sep 2013, 02:34

Code: Select all

(.spreads)fake@fake-IX270 ~ $ sudo gedit ~/.config/spreads/config.yaml
pull up an editor and add gui..

User avatar
daniel_reetz
Posts: 2786
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Re: Spreads on Linux Mint: First Impressions

Post by daniel_reetz » 05 Sep 2013, 02:35

Code: Select all

(.spreads)fake@fake-IX270 ~ $ spread gui
spreads encountered an error:
Traceback (most recent call last):
  File "/home/fake/.spreads/bin/spread", line 39, in <module>
    spreads.cli.main()
  File "/home/fake/.spreads/local/lib/python2.7/site-packages/spreads/cli.py", line 272, in main
    parser = setup_parser()
  File "/home/fake/.spreads/local/lib/python2.7/site-packages/spreads/cli.py", line 197, in setup_parser
    pluginmanager = get_pluginmanager()
  File "/home/fake/.spreads/local/lib/python2.7/site-packages/spreads/plugin.py", line 294, in get_pluginmanager
    name_order=True)
  File "/home/fake/.spreads/local/lib/python2.7/site-packages/stevedore/named.py", line 43, in __init__
    propagate_map_exceptions=propagate_map_exceptions,
  File "/home/fake/.spreads/local/lib/python2.7/site-packages/stevedore/extension.py", line 70, in __init__
    invoke_kwds)
  File "/home/fake/.spreads/local/lib/python2.7/site-packages/spreads/plugin.py", line 54, in _load_plugins
    invoke_kwds,
  File "/home/fake/.spreads/local/lib/python2.7/site-packages/stevedore/named.py", line 57, in _load_one_plugin
    ep, invoke_on_load, invoke_args, invoke_kwds,
  File "/home/fake/.spreads/local/lib/python2.7/site-packages/stevedore/extension.py", line 101, in _load_one_plugin
    plugin = ep.load()
  File "/home/fake/.spreads/local/lib/python2.7/site-packages/distribute-0.6.34-py2.7.egg/pkg_resources.py", line 2013, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/home/fake/.spreads/local/lib/python2.7/site-packages/spreadsplug/gui/__init__.py", line 3, in <module>
    from PySide import QtGui
ImportError: No module named PySide

(.spreads)fake@fake-IX270 ~ $ 
Oops. Looks like no PySide.

User avatar
jbaiter
Posts: 98
Joined: 17 Jun 2013, 16:42
E-book readers owned: 2
Number of books owned: 0
Country: Germany
Location: Munich, Germany
Contact:

Re: Spreads on Linux Mint: First Impressions

Post by jbaiter » 05 Sep 2013, 03:37

Yep, the documentation is in the need of some updating....
The fix is rather easy, though:

Code: Select all

$ sudo apt-get install python-pyside
$ ln -s /usr/lib/python2.7/dist-packages/PySide ~/.spreads/local/lib/python2.7/site-packages/
You might have to change the first path in the second command, as I'm not sure where Ubuntu stores the Python packages.
The reason why you have to create that link is that the tutorial creates a virtual Python environment (that doesn't share packages with the global system, as to avoid conflicts and keep it clean).
spreads: Command-line workflow assistant

User avatar
daniel_reetz
Posts: 2786
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Re: Spreads on Linux Mint: First Impressions

Post by daniel_reetz » 05 Sep 2013, 09:16

Thanks for the helpful hint! I'll have a look at it tonight.

User avatar
scann
Posts: 79
Joined: 31 Jul 2011, 01:23
Number of books owned: 0
Country: Argentina

Re: Spreads on Linux Mint: First Impressions

Post by scann » 09 Sep 2013, 15:42

Ok, I don't have the same problems that Daniel is having; instead, when I try to install the GUI it tells me:

Code: Select all

ln -s /usr/lib/python2.7/dist-packages/PySide ~/.spreads/local/lib/python2.7/site-packages/Pyside
ln: failed to create symbolic link `/root/.spreads/local/lib/python2.7/site-packages/Pyside': No such file or directory
I imagine this is something easy to solve, but my knowledge on this is really limited. I tried with mkdir but it didn't work. I'm also using Linux Mint.

Any ideas?

Post Reply