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

Abigail Bunyan abigail.bunyan at microsoft.com
Fri Jan 19 11:43:40 EST 2018


    # python --version
    Python 2.7.13
    # pip show scons | grep 'Location:'
    Location: /usr/local/lib/python2.7/dist-packages
    # ls -F /usr/local/lib/python2.7/dist-packages | grep -i scons
    scons-3.0.1/
    scons-3.0.1.dist-info/
    # ls -F /usr/local/lib/python2.7/dist-packages/scons-3.0.1
    SCons/

So it looks like the issue is that SCons is (for whatever reason) looking under:
    /usr/local/lib/python2.7/dist-packages/lib/scons-3.0.1
but installed in:
    /usr/local/lib/python2.7/dist-packages/scons-3.0.1
________________________________
From: Bill Deegan <bill at baddogconsulting.com>
Sent: 19 January 2018 16:02
To: SCons users mailing list
Cc: Abigail Bunyan
Subject: Re: [Scons-users] SCons can't correctly install via pip when not in a virtualenv

Which version of python is this running under?

There are some known issues with non virtualenv pip install, I'm not sure this is one of them.
Can you find where the SCons engine files are actually installed on you system?

-Bill

On Fri, Jan 19, 2018 at 9:39 AM, Abigail Bunyan via Scons-users <scons-users at scons.org<mailto:scons-users at scons.org>> wrote:
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?



_______________________________________________
Scons-users mailing list
Scons-users at scons.org<mailto:Scons-users at scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7Cabigail.bunyan%40microsoft.com%7C103ad2b6f17d41ea0a2508d55f55fd20%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C1%7C636519745305800382&sdata=1LrjWehMNS3N42iBSu5UAoylNCYthlO2JBJKtRVjYXE%3D&reserved=0>


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


More information about the Scons-users mailing list