sensor icon indicating copy to clipboard operation
sensor copied to clipboard

Dependencies during pip install

Open rponthieu opened this issue 4 years ago • 1 comments

Hi,

First thanks for the very well written library, a pleasure to read.

I wanted to ask if it was deliberated to not include dependencies (such as spidev without which the lib won't work). I saw on the readme that you expect users to understand what they do.

Other question is does sudo is needed for the pip install (it worked without for me), as using sudo with pip is ,to my knowledge, quite to avoid.

If I can make a push request for one of those please tell me (it'll be my first, I'll be glad).

Regards, R

rponthieu avatar Feb 11 '21 12:02 rponthieu

Hello,

  1. Is it deliberate to not include dependencies such as spidev?

The main reason is that all dependencies are normally included in Raspbian, and there is no need to download. I make this library very specifically for Raspbian. I want to keep setup.py as clean as possible.

  1. Why sudo pip install?

As you have found out, sudo is not necessary. And yes, the best practice is to virtualenv and not use sudo to install system-wide. Again, I was writing the instructions very specifically for my classes. Students in my classes are mostly beginners who have next to no experience in Linux and programming. I don't want to confuse them with virtualenv, so I always teach them to sudo install.

Thanks for your interest. Remember that, for this repo, all I care about is making my classes go smoothly and keeping stuff as barebone as possible for beginners.

Best, Nick

nickoala avatar Feb 11 '21 13:02 nickoala