[Scons-users] "pip install scons" result in a broken installation that is unusable

Fux Samuel (ID SIS) samuel.fux at id.ethz.ch
Tue Oct 16 01:29:30 EDT 2018


Using pip install works with the new version.


[sfux at lo-login-01 ~]$ pip install --index-url https://test.pypi.org/simple/ scons==3.1.0.alpha.20181015
Looking in indexes: https://test.pypi.org/simple/
Collecting scons==3.1.0.alpha.20181015
  Downloading https://test-files.pythonhosted.org/packages/3f/7b/0635e82416fdc9758dfd6d4361afe79166319c828d8667cb6b193ed0ecdd/scons-3.1.0.alpha.20181015.tar.gz (643kB)
    100% |████████████████████████████████| 645kB 3.2MB/s
Building wheels for collected packages: scons
  Running setup.py bdist_wheel for scons ... done
  Stored in directory: /cluster/home/sfux/.cache/pip/wheels/7c/6d/e3/a1711c22f334c8605c2ef90ac4caebee2cfa053ae2800d72f0
Successfully built scons
Installing collected packages: scons
Successfully installed scons-3.1.0a20181015
[sfux at lo-login-01 ~]$ scons

scons: *** No SConstruct file found.
File "/cluster/apps/python/2.7.14/lib64/python2.7/site-packages/scons/SCons/Script/Main.py", line 925, in _main
[sfux at lo-login-01 ~]$

--
ETH Zurich, Dr. sc. ETH Samuel Fux
High Performance Computing, Scientific IT Services
WEC D 13, Weinbergstrasse 11, 8092 Zurich, Switzerland
Phone +41 44 632 57 63, http://www.id.ethz.ch/
samuel.fux at id.ethz.ch
________________________________
Von: Scons-users [scons-users-bounces at scons.org]" im Auftrag von "Bill Deegan [bill at baddogconsulting.com]
Gesendet: Montag, 15. Oktober 2018 15:56
An: SCons users mailing list
Betreff: Re: [Scons-users] "pip install scons" result in a broken installation that is unusable

Please try:

pip install --index-url https://test.pypi.org/simple/ scons==3.1.0.alpha.20181015


On Mon, Oct 15, 2018 at 5:03 AM Fux Samuel (ID SIS) <samuel.fux at id.ethz.ch<mailto:samuel.fux at id.ethz.ch>> wrote:
@Bill: Thank you for your reply.

Wheel is installed, but still the problem persists:

[sfux at lo-login-02 ~]$ pip uninstall scons
Skipping scons as it is not installed.
[sfux at lo-login-02 ~]$ ls /cluster/apps/python/2.7.14/lib64/python2.7/site-packages/scons*
ls: cannot access '/cluster/apps/python/2.7.14/lib64/python2.7/site-packages/scons*': No such file or directory
[sfux at lo-login-02 ~]$ pip install --index-url https://test.pypi.org/simple/ scons==3.1.0.alpha.20181011
Looking in indexes: https://test.pypi.org/simple/
Collecting scons==3.1.0.alpha.20181011
Installing collected packages: scons
Successfully installed scons-3.1.0a20181011
[sfux at lo-login-02 ~]$ which scons
/cluster/apps/python/2.7.14/bin/scons
[sfux at lo-login-02 ~]$ scons
SCons import failed. Unable to find engine files in:
  /cluster/apps/python/2.7.14/bin/../engine
  /cluster/apps/python/2.7.14/bin/scons-local-3.1.0.alpha.20181011
  /cluster/apps/python/2.7.14/bin/scons-local
  /cluster/apps/python/2.7.14/lib64/python2.7/site-packages/lib/scons-3.1.0.alpha.20181011
  /cluster/apps/python/2.7.14/lib/scons-3.1.0.alpha.20181011
  /cluster/apps/python/2.7.14/lib/scons-3.1.0.alpha.20181011
  /cluster/apps/python/2.7.14/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons-3.1.0.alpha.20181011
  /cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons-3.1.0.alpha.20181011
  /cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons-3.1.0.alpha.20181011
  /cluster/apps/python/2.7.14/lib64/scons-3.1.0.alpha.20181011
  /cluster/apps/python/2.7.14/lib64/python2.7/site-packages/lib/scons
  /cluster/apps/python/2.7.14/lib/scons
  /cluster/apps/python/2.7.14/lib/scons
  /cluster/apps/python/2.7.14/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons
  /cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons
  /cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons
  /cluster/apps/python/2.7.14/lib64/scons
Traceback (most recent call last):
  File "/cluster/apps/python/2.7.14/bin/scons", line 192, in <module>
    import SCons.Script
ImportError: No module named SCons.Script
[sfux at lo-login-02 ~]$
To avoid problems with the non-system installation of Python (/cluster/apps/python vs. /usr/bin/python, I have tried to install the package in my home directory (using pip install --user) but still, the problem persists:
[sfux at lo-login-02 ~]$ pip uninstall scons
Skipping scons as it is not installed.
[sfux at lo-login-02 ~]$ ls /cluster/apps/python/2.7.14/lib64/python2.7/site-packages/scons*
ls: cannot access '/cluster/apps/python/2.7.14/lib64/python2.7/site-packages/scons*': No such file or directory
[sfux at lo-login-02 ~]$ ls $HOME/.local/lib64/python2.7/site-packages/scons*
ls: cannot access '/cluster/home/sfux/.local/lib64/python2.7/site-packages/scons*': No such file or directory
[sfux at lo-login-02 ~]$ pip install --user --index-url https://test.pypi.org/simple/ scons==3.1.0.alpha.20181011
Looking in indexes: https://test.pypi.org/simple/
Collecting scons==3.1.0.alpha.20181011
Installing collected packages: scons
Successfully installed scons-3.1.0a20181011
[sfux at lo-login-02 ~]$ which scons
~/.local/bin/scons
[sfux at lo-login-02 ~]$ scons
SCons import failed. Unable to find engine files in:
  /cluster/home/sfux/.local/bin/../engine
  /cluster/home/sfux/.local/bin/scons-local-3.1.0.alpha.20181011
  /cluster/home/sfux/.local/bin/scons-local
  /cluster/home/sfux/.local/lib64/python2.7/site-packages/lib/scons-3.1.0.alpha.20181011
  /cluster/home/sfux/.local/lib/scons-3.1.0.alpha.20181011
  /cluster/apps/python/2.7.14/lib/scons-3.1.0.alpha.20181011
  /cluster/home/sfux/.local/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons-3.1.0.alpha.20181011
  /cluster/home/sfux/.local/lib/python2.7/site-packages/scons-3.1.0.alpha.20181011
  /cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons-3.1.0.alpha.20181011
  /cluster/apps/python/2.7.14/lib64/scons-3.1.0.alpha.20181011
  /cluster/home/sfux/.local/lib64/python2.7/site-packages/lib/scons
  /cluster/home/sfux/.local/lib/scons
  /cluster/apps/python/2.7.14/lib/scons
  /cluster/home/sfux/.local/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons
  /cluster/home/sfux/.local/lib/python2.7/site-packages/scons
  /cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons
  /cluster/apps/python/2.7.14/lib64/scons
Traceback (most recent call last):
  File "/cluster/home/sfux/.local/bin/scons", line 192, in <module>
    import SCons.Script
ImportError: No module named SCons.Script
[sfux at lo-login-02 ~]$
Best regards

Sam

--
ETH Zurich, Dr. sc. ETH Samuel Fux
High Performance Computing, Scientific IT Services
WEC D 13, Weinbergstrasse 11, 8092 Zurich, Switzerland
Phone +41 44 632 57 63, http://www.id.ethz.ch/
samuel.fux at id.ethz.ch<mailto:samuel.fux at id.ethz.ch>

________________________________________
Von: Scons-users [scons-users-bounces at scons.org<mailto:scons-users-bounces at scons.org>]" im Auftrag von "Mats Wichmann [mats at wichmann.us<mailto:mats at wichmann.us>]
Gesendet: Freitag, 12. Oktober 2018 16:41
An: scons-users at scons.org<mailto:scons-users at scons.org>
Betreff: Re: [Scons-users] "pip install scons" result in a broken installation that is unusable

On 10/11/2018 11:33 PM, Fux Samuel (ID SIS) wrote:

> Not using virtualenv is a personal preference, like not using Anaconda to install Python itself or like preferring pip over distutils. I don't like the additional step of activating the virtualenv because I would like to keep things as simple as possible for our cluster users.
>
> If virtualenv is a hard requirement for using SCons, then this should be added to the Readme.md file on github. Currently the Readme.md file states with regards to dependencies:

No, it's not a hard requirement.

It's a bit risky to "pip install" packages into an environment that is
elsewise managed. To be less abstract, if most of your python comes
from Linux distribution packages, then your package manager (dpkg, rpm,
etc.) thinks it has control over those directories, and making changes
outside of the package manager (pip install) leaves you in a "bets are
off" state - something might change out underneath you as packages are
upgraded/added/removed. So for this scenario, the suggestion is to use
a virtualenv for working with additional things which _you_ want to be
in control of, OR to tell pip to do a "user install", which puts the
installed materials somewhere in a user's home directory rather than
system locations (this would not make sense for you as you're trying to
manage a shared installation). And if you are managing the Python
installation yourself, the chance of conflicts is less, or at least, you
can be in charge of them.




_______________________________________________
Scons-users mailing list
Scons-users at scons.org<mailto:Scons-users at scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users
_______________________________________________
Scons-users mailing list
Scons-users at scons.org<mailto:Scons-users at scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20181016/45023d32/attachment-0001.html>


More information about the Scons-users mailing list