• Home
  • More…
  • Archives
  • About…

NUKLEOS weblog

Virtual Memory (Resurrected)

Feeds:
Posts
Comments
« Let’s Talk About A Brilliant Mind
Fear As A Motivator In The Age Of Computing »

How To Install An Old Pyusb Package On Xubuntu

07/02/2017 by Wouter

It’s something I need to remember: how do I install an old PyUSB package on Xubuntu (or a similar Debian-based OS). Why, you ask? Because I need that old version 0.4.3 for the little script that reads the solar energy numbers from the SMA Sunny Beam.

Image of the SMA Sunny Beam monitor for our solar panel installation

The SMA Sunny Beam monitor for our solar panel installation

Luckily, it isn’t too hard to do. This is my context:

  • I am using Python 2.7
  • I’m not certain the 0.4.3 version is compatible with newer versions of Python
  • You need a copy of the relevant archive file called ‘pyusb_0.4.3.orig.tar.gz‘ (which you can find here: http://ftp.ubuntu.com/ubuntu/ubuntu/pool/universe/p/pyusb/)

Step one is to make sure you have the required header files to compile the PyUSB package. So you open up a terminal session and execute

sudo apt-get install libusb-dev
sudo apt-get install python-dev

Step two: Extract the root folder and all the files from the PyUSB archive, and make that folder your current directory in the terminal session.

Step three: compile and install the package with this command:

sudo python setup.py install

That’s it. When all goes well, you’ll be able to verify the existence of two new files on your system, in a directory called “/usr/local/lib/python2.7/dist-packages“:

usb.so
pyusb-0.4.3.egg-info

Done!

Share this:

  • Twitter
  • LinkedIn
  • Email

Like this:

Like Loading...

Related

Posted in Python, Software Development, Ubuntu |

  • My Activity

    February 2017
    M T W T F S S
     12345
    6789101112
    13141516171819
    20212223242526
    2728  
    « Jan   Mar »
  • My Favourites

    • Ars Technica
    • bvlg.blogspot.com
    • ColdFusion Bloggers
    • Digital Photography Review
    • George Monbiot
    • Heise News Ticker
    • Jamie Todd Rubin
    • Jon Udell
    • Planet Python
    • Scripting.com
    • Seth Gottliebs Blog
    • The Electronic Intifada
  • My Sites

    • Innologos
    • My photos (Flickr)
    • N U K L E O S
  • On Probation

    • Artima Weblogs
    • Ruby Inside
    • The Cult Of Mac
    • The Unofficial Apple Weblog
  • My Categories

    Android Apple & Macintosh ColdFusion Content Management Design and Art Internet Java Linkrot! Linux Literature Mobile Computing Motorcycles Music Patents, IP, Privacy and More PDA Personal Photography Privacy and Security Python R1100S Ruby Science Social Media Society Software Software Development Technology Ubuntu Web Development Wiki
  • My Photos on Flickr

    P1020834P1020823P1020479
    More Photos

Create a free website or blog at WordPress.com.

WPThemes.


Cancel
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
%d bloggers like this: