From 938f9890ab3c0dd76d09f8e236b71501c0283012 Mon Sep 17 00:00:00 2001 From: Asuki Kono Date: Fri, 6 Jan 2017 05:51:07 +0900 Subject: [PATCH] Update doc about installation for raspi (#194) * Update dec about installation for raspi * Rollback syntax about warning on raspi doc * Add a link of installation-manual on raspi doc * Update last reviewed date for raspi doc --- doc/user/raspi.rst | 90 ++++++++++------------------------------------ 1 file changed, 18 insertions(+), 72 deletions(-) diff --git a/doc/user/raspi.rst b/doc/user/raspi.rst index ea807a4..bb05f5e 100644 --- a/doc/user/raspi.rst +++ b/doc/user/raspi.rst @@ -2,95 +2,41 @@ Raspberry Pi ************ -:Last Reviewed: 2016-12-07 +:Last Reviewed: 2017-01-05 -This instructions were tested on Raspbian. +This instructions were tested on Raspbian Jessie. .. warning:: You should **never** directly connect an printer with RS232-interface (serial port) directly to a Raspberry PI or similar interface (e.g. those simple USB-sticks without encasing). Those interfaces are based on 5V- or 3,3V-logic (the latter in the case of Raspberry PI). Classical RS232 uses 12V-logic and would **thus destroy your interface**. Connect both systems with an appropriate *level shifter*. -Normal installation -------------------- -Normally you should be able to install the library just like on any other -Linux distribution. Please be reminded that the newer versions are not in Debian -and thus not in Raspbian. -However, you can just install with `pip`. For more details on this -check the :doc:`installation-manual `. - -If this works for you, you don't need to continue reading this part. -If not, please check if the rest might help you. -Should you have any problems, do not hesitate to contact the maintainer, since you -might have found a bug in the code or documentation. - Dependencies ------------ - First, install the packages available on Raspbian. :: - apt-get install python-imaging python-serial python-setuptools - -PyUSB -^^^^^ - -.. todo:: The freshness of this part is not verified. Please take it with a grain of salt or help updating it. - -PyUSB 1.0 is not available on Ubuntu, so you have to download and -install it manually. - -1. Download the latest tarball from - `Sourceforge `__ -2. Decompress the zip file -3. Install the library - - :: - - # wget ... - unzip pyusb*.zip - cd pyusb* - python setup.py build - sudo python setup.py install - -python-qrcode -^^^^^^^^^^^^^ - -You can install qrcode just from pip with - - :: - - sudo pip install qrcode - -Otherwise you can install it manually. If in doubt please check the documentation of the -`python-qrcode`-project. - -1. Checkout the code from github -2. Install the library - - :: - - git clone https://github.com/lincolnloop/python-qrcode - cd python-qrcode - python setup.py build - sudo python setup.py install + sudo apt-get install python3 python3-setuptools python3-pip libjpeg8-dev Installation ------------ - -If you have installed pyusb for libusb-1.0 then you need to: - -1. Download the latest file -2. Decompress the file -3. Install the library +You can install by using pip3. :: - git clone --recursive https://github.com/python-escpos/python-escpos.git - cd python-escpos - python setup.py build - sudo python setup.py install + sudo pip3 install --upgrade pip + sudo pip3 install python-escpos -Now you can attach your printer and and test it with the example code in -the project's set of examples. You can find that in the `project-repository `__. +Run +--- +You need sudo and python3 to run your program. + +:: + + sudo python3 your-program.py + +Now you can attach your printer and and test it with the example code in the project's set of examples. +You can find that in the `project-repository `__. + +For more details on this check the :doc:`installation-manual `.