[Scons-users] SCons can't correctly install via pip when not in a virtualenv

Abigail Bunyan abigail.bunyan at microsoft.com
Fri Jan 19 09:39:15 EST 2018


Installing SCons via pip works fine in a virtualenv:

    $ docker run -it --rm debian:latest
    # apt update && apt install -yq --no-install-recommends python virtualenv
    # virtualenv venv && source venv/bin/activate
    # pip install scons
    # scons --version
    SCons by Steven Knight et al.:
        script: v3.0.1.74b2c53bc42290e911b334a6b44f187da698a668, 2017/11/14 13:16:53, by bdbaddog on hpmicrodog
        engine: v3.0.1.74b2c53bc42290e911b334a6b44f187da698a668, 2017/11/14 13:16:53, by bdbaddog on hpmicrodog
        engine path: ['/venv/lib/python2.7/site-packages/scons-3.0.1/SCons']
    Copyright (c) 2001 - 2017 The SCons Foundation

But not when you install SCons via pip systemwide:

    $ docker run -it --rm debian:latest
    # apt update && apt install -yq --no-install-recommends python-pip
    # pip install --upgrade pip setuptools wheel
    # pip install scons
    # scons --version
    SCons import failed. Unable to find engine files in:
      /usr/local/bin/../engine
      /usr/local/bin/scons-local-3.0.1
      /usr/local/bin/scons-local
      /usr/local/lib/python2.7/dist-packages/lib/scons-3.0.1
      /usr/local/lib/scons-3.0.1
      /usr/lib/scons-3.0.1
      /usr/local/lib/scons-3.0.1
      /usr/local/lib/python2.7/dist-packages/lib/python2.7/site-packages/scons-3.0.1
      /usr/local/lib/python2.7/site-packages/scons-3.0.1
      /usr/lib/python2.7/site-packages/scons-3.0.1
      /usr/local/lib/python2.7/site-packages/scons-3.0.1
      /usr/lib/scons-3.0.1
      /usr/local/lib/python2.7/dist-packages/lib/scons
      /usr/local/lib/scons
      /usr/lib/scons
      /usr/local/lib/scons
      /usr/local/lib/python2.7/dist-packages/lib/python2.7/site-packages/scons
      /usr/local/lib/python2.7/site-packages/scons
      /usr/lib/python2.7/site-packages/scons
      /usr/local/lib/python2.7/site-packages/scons
      /usr/lib/scons
    Traceback (most recent call last):
      File "/usr/local/bin/scons", line 192, in <module>
        import SCons.Script
    ImportError: No module named SCons.Script

Is this a known issue?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180119/fed7a9a3/attachment.html>


More information about the Scons-users mailing list