[Scons-users] pip3-installing SCons on current Raspbian Stretch fails

Mats Wichmann mats at wichmann.us
Thu Mar 14 11:07:23 EDT 2019


On 3/14/19 8:52 AM, Arndt Pauschardt wrote:
> Hi, *
>  
> a) I have a Raspberry 3 with the latest Raspbian Stretch release:
> pi at raspi_rsdk1:~ $ uname -a
> Linux raspi_rsdk1 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018
> armv7l GNU/Linux
>  
> b) the 'default' python is a Py2:
> pi at raspi_rsdk1:~ $ python -V
> Python 2.7.13
...
> Now my question:
> 1. I guess I need to address the pip3 install problem from above to a
> Raspbian mailing list, correct? It's pip3 which is causing the trouble,
> right? Or is the offending path to /usr/local/man/man1 coming from SCons?
> 2. Is anyone here who is using sucessfully using SCons with Py3 on Raspbian?
> 2. looking into /usr/local/bin/scons, I found that scons is she-banged
> to "python", so in case nothing in PATH is tweaked, scons will end up
> using Py2 at least on Raspbian where both are available per default. The
> SCons man says that Py3 is prefered, so the assumption behind this is
> that the user is linking "python" to "python3" in order to use Py3 as
> engine under the hood. Correct?

Hmm, this is kind of odd:

  File "/usr/lib/python3.5/os.py", line 241, in makedirs
    mkdir(name, mode)
FileNotFoundError: [Errno 2] No such file or directory:
'/usr/local/man/man1'

see if some fiddling behind the scenes could fix that, or try a user
install (pip3 install --user scons)

Personally I advise people to never pip install on top of the system
installation - use a user install, or install in a virtualenv.  You
never know when an apt-get update will break something for you, because
the package system believes it has control of the directories into which
it installs, and it does not have to worry about outside intervention
from tools it doesn't know about.

I have an rpi setup here, but don't use scons on it. I could try, if it
would help.

The shebang line is only used if you invoke the script as a program,
that is, you leave the system to guess what the interpreter is. You can
always get what you want by being explicit:

python3 /usr/local/bin/scons

will get you python3 throughout; scons itself then invokes further
things by using the sys.executable value so it will use the same python
you invoked it with.



More information about the Scons-users mailing list