Search code examples
pythoneclipsepydevpython-import

Importing SpiDev Library In Eclipse - PyDev


I've successfully installed PyDev Plugin to my Eclipse IDE. I'm trying to import SpiDev Library but it cannot be found.

What I tried so far:

  • I added SpiDev as an External Library, one time from Github from here, and another time from PyPI but no luck yet.

The Interpreter already set to Python.

A Closer Look

Any help is very much appreciated.


Solution

  • My suggestion is just using pypi (unless you're going to develop itself).

    So, the steps would be:

    pip install spidev

    (the version you just got from github in your screenshot will not work because it's a compiled module -- i.e.: it needs to generate a spydev.so -- and you didn't compile it... if you pip install it, it should do that by default).

    So, after installing it with pip, it should work, provided you installed it in the proper interpreter.