Skip to main content

Posts

Showing posts from August, 2017

useful linux commands for pdf editor

pdfunite        pdfunite merges several PDF (Portable Document Format) files in order of their occurrence on command line to one PDF result file. EXAMPLE         pdfunite sample1.pdf sample2.pdf sample.pdf        merges all pages from sample1.pdf and sample2.pdf (in that order) and creates sample.pdf pdftocairo        pdftocairo [options] PDF-file [output-file] DESCRIPTION        pdftocairo  converts Portable Document Format (PDF) files, using the cairo output device of the pop‐pler PDF library, to any of the following output formats: OPTIONS        -png   Generates a PNG file(s)        -jpeg  Generates a JPEG file(s)        -tiff  Generates a TIFF file(s)        -pdf   Generates a PDF file pdfseparate        pdfseparate extract single pages from a...

How to install 3rd parties modules to Python 3.6

How to work with multiple versions of Python installed in parallel? Python version upgrades quickly, it's caused multiple versions on my Debian OS: Python 2 defaults to 2.7; Python 3 defaults to 3.5, then when I installed Python 3.6. It causes 3rd parties modules import problem in Python 3.6.  Take popular pyperclip as example. When I installed pyperclip module, which is popular one to copy/paste clipboard content, in bash with:  pip3 install pyperclip  It prompts install successful, but prompt error when I import in Python 3.6.  >>> import pyperclip Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import pyperclip ModuleNotFoundError: No module named 'pyperclip' The reason is the default Python 3 is 3.5 i/o 3.6. Install with pip3 will point to 3.5 directly. So solved it, install as following:  peter@Debian:~$ python3.6 -m pip install pyperclip Docs Refer: https://docs.python.org/3/install...