Discussion:
[Scons-users] "pip install scons" result in a broken installation that is unusable
Fux Samuel (ID SIS)
2018-10-10 07:47:07 UTC
Permalink
Hi,

I installed scons 3.0.1 with the command
pip install scons
on our hpc cluster, using Python 2.7.14. The installation seems to be pretty broken:
[***@lo-login-02 ~]$ pip install scons
Collecting scons
Installing collected packages: scons
Successfully installed scons-3.0.1
You are using pip version 9.0.3, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[***@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.0.1
/cluster/apps/python/2.7.14/bin/scons-local
/cluster/apps/python/2.7.14/lib64/python2.7/site-packages/lib/scons-3.0.1
/cluster/apps/python/2.7.14/lib/scons-3.0.1
/cluster/apps/python/2.7.14/lib/scons-3.0.1
/cluster/apps/python/2.7.14/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons-3.0.1
/cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons-3.0.1
/cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons-3.0.1
/cluster/apps/python/2.7.14/lib64/scons-3.0.1
/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
[***@lo-login-02 ~]$ which python
/cluster/apps/python/2.7.14/bin/python
[***@lo-login-02 ~]$ which pip
/cluster/apps/python/2.7.14/bin/pip
[***@lo-login-02 ~]$ cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
[***@lo-login-02 ~]$
Is this a known problem ?

Can scons be installed with pip without using a virtualenv ?

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/
***@id.ethz.ch
Bill Deegan
2018-10-10 16:42:20 UTC
Permalink
Sam,

Try:

# update your pip and wheel package there have been significant changes
since py 2.7.14
pip install -U pip wheel
Then retry installing scons.

-Bill

On Wed, Oct 10, 2018 at 3:53 AM Fux Samuel (ID SIS) <***@id.ethz.ch>
wrote:

> Hi,
>
> I installed scons 3.0.1 with the command
>
> pip install scons
>
> on our hpc cluster, using Python 2.7.14. The installation seems to be
> pretty broken:
>
> [***@lo-login-02 ~]$ *pip install scons*
> Collecting scons
> Installing collected packages: scons
> Successfully installed scons-3.0.1
> You are using pip version 9.0.3, however version 18.1 is available.
> You should consider upgrading via the 'pip install --upgrade pip'
> command.
> [***@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.0.1
> /cluster/apps/python/2.7.14/bin/scons-local
> /cluster/apps/python/2.7.14/lib64/python2.7/site-packages/lib/scons-3.0.1
> /cluster/apps/python/2.7.14/lib/scons-3.0.1
> /cluster/apps/python/2.7.14/lib/scons-3.0.1
>
> /cluster/apps/python/2.7.14/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons-3.0.1
> /cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons-3.0.1
> /cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons-3.0.1
> /cluster/apps/python/2.7.14/lib64/scons-3.0.1
> /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
> [***@lo-login-02 ~]$ *which python*
> /cluster/apps/python/2.7.14/bin/python
> [***@lo-login-02 ~]$ *which pip*
> /cluster/apps/python/2.7.14/bin/pip
> [***@lo-login-02 ~]$ *cat /etc/redhat-release *
> CentOS Linux release 7.5.1804 (Core)
> [***@lo-login-02 ~]$
>
> Is this a known problem ?
>
> Can scons be installed with pip without using a virtualenv ?
>
> 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/
> ***@id.ethz.ch
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
Fux Samuel (ID SIS)
2018-10-11 09:03:41 UTC
Permalink
Hi Bill,

Thank you for your reply. I updated pip, but scons is still broken:
[***@lo-login-02 ~]$ pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl (1.3MB)
100% || 1.3MB 763kB/s
Installing collected packages: pip
Found existing installation: pip 9.0.3
Uninstalling pip-9.0.3:
Successfully uninstalled pip-9.0.3
Successfully installed pip-18.1
[***@lo-login-02 ~]$ pip install scons
Collecting scons
Installing collected packages: scons
Successfully installed scons-3.0.1
[***@lo-login-02 ~]$ scons
SCons import failed. Unable to find engine files in:
/cluster/apps/python/2.7.14_cpu/bin/../engine
/cluster/apps/python/2.7.14_cpu/bin/scons-local-3.0.1
/cluster/apps/python/2.7.14_cpu/bin/scons-local
/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/scons-3.0.1
/cluster/apps/python/2.7.14_cpu/lib/scons-3.0.1
/cluster/apps/python/2.7.14_cpu/lib/scons-3.0.1
/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons-3.0.1
/cluster/apps/python/2.7.14_cpu/lib/python2.7/site-packages/scons-3.0.1
/cluster/apps/python/2.7.14_cpu/lib/python2.7/site-packages/scons-3.0.1
/cluster/apps/python/2.7.14_cpu/lib64/scons-3.0.1
/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/scons
/cluster/apps/python/2.7.14_cpu/lib/scons
/cluster/apps/python/2.7.14_cpu/lib/scons
/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons
/cluster/apps/python/2.7.14_cpu/lib/python2.7/site-packages/scons
/cluster/apps/python/2.7.14_cpu/lib/python2.7/site-packages/scons
/cluster/apps/python/2.7.14_cpu/lib64/scons
Traceback (most recent call last):
File "/cluster/apps/python/2.7.14_cpu/bin/scons", line 192, in <module>
import SCons.Script
ImportError: No module named SCons.Script
[***@lo-login-02 ~]$
The following workaround fixes the problem
export SCONS_LIB_DIR=/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/scons-3.0.1
This is not my preferred solution as I would like to avoid setting environment variables for all users that use Python on our hpc cluster if it is only required for Scons.

The issues arises from line 157 in /cluster/apps/python/2.7.14_cpu/bin/scons:
temp = [os.path.join(x, 'lib') for x in prefs]
Because of adding "lib", to the guess for the path of the scons files, scons searches in
/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/scons-3.0.1
instead of
/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/scons-3.0.1
After changing
temp = [os.path.join(x, 'lib') for x in prefs]
to
temp = [os.path.join(x, '') for x in prefs]
scons does not show this error any more:
[***@lo-login-02 bin]$ scons

scons: *** No SConstruct file found.
File "/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/scons-3.0.1/SCons/Script/Main.py", line 924, in _main
[***@lo-login-02 bin]$
I will use this workaround as it avoids setting environment variables. It is clear to me, that this only fixes the problem on our system, and maybe for other sites there is a different solution required.

Would it make sense to open an issue on github to share my findings, as it seems that many people are facing this problem ?

* https://github.com/FPGAwars/apio/issues/143
* https://github.com/Homebrew/legacy-homebrew/issues/5794
* https://stackoverflow.com/questions/24897687/import-failed-unable-to-find-scons-files-import-scons-script
* https://stackoverflow.com/questions/24897687/import-failed-unable-to-find-scons-files-import-scons-script/32540784
* http://scons.1086193.n5.nabble.com/SCons-can-t-correctly-install-via-pip-when-not-in-a-virtualenv-td42715.html
* https://pairlist4.pair.net/pipermail/scons-users/2017-December/006589.html

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/
***@id.ethz.ch
________________________________
Von: Scons-users [scons-users-***@scons.org]" im Auftrag von "Bill Deegan [***@baddogconsulting.com]
Gesendet: Mittwoch, 10. Oktober 2018 18:42
An: SCons users mailing list
Betreff: Re: [Scons-users] "pip install scons" result in a broken installation that is unusable

Sam,

Try:

# update your pip and wheel package there have been significant changes since py 2.7.14
pip install -U pip wheel
Then retry installing scons.

-Bill

On Wed, Oct 10, 2018 at 3:53 AM Fux Samuel (ID SIS) <***@id.ethz.ch<mailto:***@id.ethz.ch>> wrote:
Hi,

I installed scons 3.0.1 with the command
pip install scons
on our hpc cluster, using Python 2.7.14. The installation seems to be pretty broken:
[***@lo-login-02 ~]$ pip install scons
Collecting scons
Installing collected packages: scons
Successfully installed scons-3.0.1
You are using pip version 9.0.3, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[***@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.0.1
/cluster/apps/python/2.7.14/bin/scons-local
/cluster/apps/python/2.7.14/lib64/python2.7/site-packages/lib/scons-3.0.1
/cluster/apps/python/2.7.14/lib/scons-3.0.1
/cluster/apps/python/2.7.14/lib/scons-3.0.1
/cluster/apps/python/2.7.14/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons-3.0.1
/cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons-3.0.1
/cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons-3.0.1
/cluster/apps/python/2.7.14/lib64/scons-3.0.1
/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
[***@lo-login-02 ~]$ which python
/cluster/apps/python/2.7.14/bin/python
[***@lo-login-02 ~]$ which pip
/cluster/apps/python/2.7.14/bin/pip
[***@lo-login-02 ~]$ cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
[***@lo-login-02 ~]$
Is this a known problem ?

Can scons be installed with pip without using a virtualenv ?

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/
***@id.ethz.ch<mailto:***@id.ethz.ch>
Mats Wichmann
2018-10-11 10:20:45 UTC
Permalink
On October 11, 2018 3:03:41 AM MDT, "Fux Samuel (ID SIS)" <***@id.ethz.ch> wrote:
>Hi Bill,
>
>Thank you for your reply. I updated pip, but scons is still broken:
>[***@lo-login-02 ~]$ pip install --upgrade pip
>Collecting pip
>Downloading
>https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl
>(1.3MB)
> 100% |████████████████████████████████| 1.3MB 763kB/s
>Installing collected packages: pip
> Found existing installation: pip 9.0.3
> Uninstalling pip-9.0.3:
> Successfully uninstalled pip-9.0.3
>Successfully installed pip-18.1
>[***@lo-login-02 ~]$ pip install scons
>Collecting scons
>Installing collected packages: scons
>Successfully installed scons-3.0.1
>[***@lo-login-02 ~]$ scons
>SCons import failed. Unable to find engine files in:
> /cluster/apps/python/2.7.14_cpu/bin/../engine
> /cluster/apps/python/2.7.14_cpu/bin/scons-local-3.0.1
> /cluster/apps/python/2.7.14_cpu/bin/scons-local
>/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/scons-3.0.1
> /cluster/apps/python/2.7.14_cpu/lib/scons-3.0.1
> /cluster/apps/python/2.7.14_cpu/lib/scons-3.0.1
>/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons-3.0.1
>/cluster/apps/python/2.7.14_cpu/lib/python2.7/site-packages/scons-3.0.1
>/cluster/apps/python/2.7.14_cpu/lib/python2.7/site-packages/scons-3.0.1
> /cluster/apps/python/2.7.14_cpu/lib64/scons-3.0.1
>/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/scons
> /cluster/apps/python/2.7.14_cpu/lib/scons
> /cluster/apps/python/2.7.14_cpu/lib/scons
>/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons
> /cluster/apps/python/2.7.14_cpu/lib/python2.7/site-packages/scons
> /cluster/apps/python/2.7.14_cpu/lib/python2.7/site-packages/scons
> /cluster/apps/python/2.7.14_cpu/lib64/scons
>Traceback (most recent call last):
>File "/cluster/apps/python/2.7.14_cpu/bin/scons", line 192, in <module>
> import SCons.Script
>ImportError: No module named SCons.Script
>[***@lo-login-02 ~]$
>The following workaround fixes the problem
>export
>SCONS_LIB_DIR=/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/scons-3.0.1
>This is not my preferred solution as I would like to avoid setting
>environment variables for all users that use Python on our hpc cluster
>if it is only required for Scons.
>
>The issues arises from line 157 in
>/cluster/apps/python/2.7.14_cpu/bin/scons:
> temp = [os.path.join(x, 'lib') for x in prefs]
>Because of adding "lib", to the guess for the path of the scons files,
>scons searches in
>/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/scons-3.0.1
>instead of
>/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/scons-3.0.1
>After changing
> temp = [os.path.join(x, 'lib') for x in prefs]
>to
> temp = [os.path.join(x, '') for x in prefs]
>scons does not show this error any more:
>[***@lo-login-02 bin]$ scons
>
>scons: *** No SConstruct file found.
>File
>"/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/scons-3.0.1/SCons/Script/Main.py",
>line 924, in _main
>[***@lo-login-02 bin]$
>I will use this workaround as it avoids setting environment variables.
>It is clear to me, that this only fixes the problem on our system, and
>maybe for other sites there is a different solution required.
>
>Would it make sense to open an issue on github to share my findings, as
>it seems that many people are facing this problem ?
>
> * https://github.com/FPGAwars/apio/issues/143
> * https://github.com/Homebrew/legacy-homebrew/issues/5794
>*
>https://stackoverflow.com/questions/24897687/import-failed-unable-to-find-scons-files-import-scons-script
>*
>https://stackoverflow.com/questions/24897687/import-failed-unable-to-find-scons-files-import-scons-script/32540784
>*
>http://scons.1086193.n5.nabble.com/SCons-can-t-correctly-install-via-pip-when-not-in-a-virtualenv-td42715.html
>*
>https://pairlist4.pair.net/pipermail/scons-users/2017-December/006589.html
>
>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/
>***@id.ethz.ch
>________________________________
>Von: Scons-users [scons-users-***@scons.org]" im Auftrag von "Bill
>Deegan [***@baddogconsulting.com]
>Gesendet: Mittwoch, 10. Oktober 2018 18:42
>An: SCons users mailing list
>Betreff: Re: [Scons-users] "pip install scons" result in a broken
>installation that is unusable
>
>Sam,
>
>Try:
>
># update your pip and wheel package there have been significant changes
>since py 2.7.14
>pip install -U pip wheel
>Then retry installing scons.
>
>-Bill
>
>On Wed, Oct 10, 2018 at 3:53 AM Fux Samuel (ID SIS)
><***@id.ethz.ch<mailto:***@id.ethz.ch>> wrote:
>Hi,
>
>I installed scons 3.0.1 with the command
>pip install scons
>on our hpc cluster, using Python 2.7.14. The installation seems to be
>pretty broken:
>[***@lo-login-02 ~]$ pip install scons
>Collecting scons
>Installing collected packages: scons
>Successfully installed scons-3.0.1
>You are using pip version 9.0.3, however version 18.1 is available.
>You should consider upgrading via the 'pip install --upgrade pip'
>command.
>[***@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.0.1
> /cluster/apps/python/2.7.14/bin/scons-local
>/cluster/apps/python/2.7.14/lib64/python2.7/site-packages/lib/scons-3.0.1
> /cluster/apps/python/2.7.14/lib/scons-3.0.1
> /cluster/apps/python/2.7.14/lib/scons-3.0.1
>/cluster/apps/python/2.7.14/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons-3.0.1
> /cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons-3.0.1
> /cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons-3.0.1
> /cluster/apps/python/2.7.14/lib64/scons-3.0.1
> /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
>[***@lo-login-02 ~]$ which python
>/cluster/apps/python/2.7.14/bin/python
>[***@lo-login-02 ~]$ which pip
>/cluster/apps/python/2.7.14/bin/pip
>[***@lo-login-02 ~]$ cat /etc/redhat-release
>CentOS Linux release 7.5.1804 (Core)
>[***@lo-login-02 ~]$
>Is this a known problem ?
>
>Can scons be installed with pip without using a virtualenv ?
>
>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/
>***@id.ethz.ch<mailto:***@id.ethz.ch>
>_______________________________________________
>Scons-users mailing list
>Scons-***@scons.org<mailto:Scons-***@scons.org>
>https://pairlist4.pair.net/mailman/listinfo/scons-users

there's some dodgy logic in how "prefs" is built up... e.g. look at the 7th item in the list of places it tried. and I see for win32, the expectation is you only need to look in C:\python*, though that is no longer the default location for Python 3 since 3.5. this should get some cleanup, so I'd say there's plenty of justification for filing an issue.


--
Sent from a mobile device with K-9 Mail. Please excuse my brevity.
Bill Deegan
2018-10-11 16:19:43 UTC
Permalink
It should work with recent pip.
Let me take a look today.
-Bill

On Thu, Oct 11, 2018 at 6:26 AM Mats Wichmann <***@wichmann.us> wrote:

> On October 11, 2018 3:03:41 AM MDT, "Fux Samuel (ID SIS)" <
> ***@id.ethz.ch> wrote:
>>
>> Hi Bill,
>>
>> Thank you for your reply. I updated pip, but scons is still broken:
>>
>> [***@lo-login-02 ~]$ pip install --upgrade pip
>> Collecting pip
>> Downloading
>> https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl
>> (1.3MB)
>> 100% |████████████████████████████████| 1.3MB 763kB/s
>> Installing collected packages: pip
>> Found existing installation: pip 9.0.3
>> Uninstalling pip-9.0.3:
>> Successfully uninstalled pip-9.0.3
>> Successfully installed pip-18.1
>> [***@lo-login-02 ~]$ pip install scons
>> Collecting scons
>> Installing collected packages: scons
>> Successfully installed scons-3.0.1
>> [***@lo-login-02 ~]$ scons
>> SCons import failed. Unable to find engine files in:
>> /cluster/apps/python/2.7.14_cpu/bin/../engine
>> /cluster/apps/python/2.7.14_cpu/bin/scons-local-3.0.1
>> /cluster/apps/python/2.7.14_cpu/bin/scons-local
>>
>> /cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/scons-3.0.1
>> /cluster/apps/python/2.7.14_cpu/lib/scons-3.0.1
>> /cluster/apps/python/2.7.14_cpu/lib/scons-3.0.1
>>
>> /cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons-3.0.1
>> /cluster/apps/python/2.7.14_cpu/lib/python2.7/site-packages/scons-3.0.1
>> /cluster/apps/python/2.7.14_cpu/lib/python2.7/site-packages/scons-3.0.1
>> /cluster/apps/python/2.7.14_cpu/lib64/scons-3.0.1
>> /cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/scons
>> /cluster/apps/python/2.7.14_cpu/lib/scons
>> /cluster/apps/python/2.7.14_cpu/lib/scons
>>
>> /cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons
>> /cluster/apps/python/2.7.14_cpu/lib/python2.7/site-packages/scons
>> /cluster/apps/python/2.7.14_cpu/lib/python2.7/site-packages/scons
>> /cluster/apps/python/2.7.14_cpu/lib64/scons
>> Traceback (most recent call last):
>> File "/cluster/apps/python/2.7.14_cpu/bin/scons", line 192, in <module>
>> import SCons.Script
>> ImportError: No module named SCons.Script
>> [***@lo-login-02 ~]$
>>
>> The following workaround fixes the problem
>>
>> export
>> SCONS_LIB_DIR=/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/scons-3.0.1
>>
>> This is not my preferred solution as I would like to avoid setting
>> environment variables for all users that use Python on our hpc cluster if
>> it is only required for Scons.
>>
>> The issues arises from line 157 in
>> /cluster/apps/python/2.7.14_cpu/bin/scons:
>>
>> temp = [os.path.join(x, 'lib') for x in prefs]
>>
>> Because of adding "lib", to the guess for the path of the scons files,
>> scons searches in
>>
>>
>> /cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/scons-3.0.1
>>
>> instead of
>>
>> /cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/scons-3.0.1
>>
>> After changing
>>
>> temp = [os.path.join(x, 'lib') for x in prefs]
>>
>> to
>>
>> temp = [os.path.join(x, '') for x in prefs]
>>
>> scons does not show this error any more:
>>
>> [***@lo-login-02 bin]$ scons
>>
>> scons: *** No SConstruct file found.
>> File
>> "/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/scons-3.0.1/SCons/Script/Main.py",
>> line 924, in _main
>> [***@lo-login-02 bin]$
>>
>> I will use this workaround as it avoids setting environment variables. It
>> is clear to me, that this only fixes the problem on our system, and maybe
>> for other sites there is a different solution required.
>>
>> Would it make sense to open an issue on github to share my findings, as
>> it seems that many people are facing this problem ?
>>
>> - https://github.com/FPGAwars/apio/issues/143
>> - https://github.com/Homebrew/legacy-homebrew/issues/5794
>> -
>> https://stackoverflow.com/questions/24897687/import-failed-unable-to-find-scons-files-import-scons-script
>> -
>> https://stackoverflow.com/questions/24897687/import-failed-unable-to-find-scons-files-import-scons-script/32540784
>> -
>> http://scons.1086193.n5.nabble.com/SCons-can-t-correctly-install-via-pip-when-not-in-a-virtualenv-td42715.html
>> -
>> https://pairlist4.pair.net/pipermail/scons-users/2017-December/006589.html
>>
>> 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/
>> ***@id.ethz.ch
>> ------------------------------
>> *Von:* Scons-users [scons-users-***@scons.org]" im Auftrag von "Bill
>> Deegan [***@baddogconsulting.com]
>> *Gesendet:* Mittwoch, 10. Oktober 2018 18:42
>> *An:* SCons users mailing list
>> *Betreff:* Re: [Scons-users] "pip install scons" result in a broken
>> installation that is unusable
>>
>> Sam,
>>
>> Try:
>>
>> # update your pip and wheel package there have been significant changes
>> since py 2.7.14
>> pip install -U pip wheel
>> Then retry installing scons.
>>
>> -Bill
>>
>> On Wed, Oct 10, 2018 at 3:53 AM Fux Samuel (ID SIS) <
>> ***@id.ethz.ch> wrote:
>>
>>> Hi,
>>>
>>> I installed scons 3.0.1 with the command
>>>
>>> pip install scons
>>>
>>> on our hpc cluster, using Python 2.7.14. The installation seems to be
>>> pretty broken:
>>>
>>> [***@lo-login-02 ~]$ *pip install scons*
>>> Collecting scons
>>> Installing collected packages: scons
>>> Successfully installed scons-3.0.1
>>> You are using pip version 9.0.3, however version 18.1 is available.
>>> You should consider upgrading via the 'pip install --upgrade pip'
>>> command.
>>> [***@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.0.1
>>> /cluster/apps/python/2.7.14/bin/scons-local
>>>
>>> /cluster/apps/python/2.7.14/lib64/python2.7/site-packages/lib/scons-3.0.1
>>> /cluster/apps/python/2.7.14/lib/scons-3.0.1
>>> /cluster/apps/python/2.7.14/lib/scons-3.0.1
>>>
>>> /cluster/apps/python/2.7.14/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons-3.0.1
>>> /cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons-3.0.1
>>> /cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons-3.0.1
>>> /cluster/apps/python/2.7.14/lib64/scons-3.0.1
>>> /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
>>> [***@lo-login-02 ~]$ *which python*
>>> /cluster/apps/python/2.7.14/bin/python
>>> [***@lo-login-02 ~]$ *which pip*
>>> /cluster/apps/python/2.7.14/bin/pip
>>> [***@lo-login-02 ~]$ *cat /etc/redhat-release *
>>> CentOS Linux release 7.5.1804 (Core)
>>> [***@lo-login-02 ~]$
>>>
>>> Is this a known problem ?
>>>
>>> Can scons be installed with pip without using a virtualenv ?
>>>
>>> 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/
>>> ***@id.ethz.ch
>>> _______________________________________________
>>> Scons-users mailing list
>>> Scons-***@scons.org
>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>
>>
> there's some dodgy logic in how "prefs" is built up... e.g. look at the
> 7th item in the list of places it tried. and I see for win32, the
> expectation is you only need to look in C:\python*, though that is no
> longer the default location for Python 3 since 3.5. this should get some
> cleanup, so I'd say there's plenty of justification for filing an issue.
>
>
> --
> Sent from a mobile device with K-9 Mail. Please excuse my brevity.
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
Bill Deegan
2018-10-11 16:36:49 UTC
Permalink
I just did:
In a virtualenv
pip install -U pip wheel
pip install scons and it worked as expected.

Ah I see. You're not using a virtualenv.

Any reason you're note using a virtualenv?

It's much cleaner than having to reinstall or manually clean up your python
install if you mistakenly install a package and/or use setup.py directly to
install.

-Bill




On Thu, Oct 11, 2018 at 12:19 PM Bill Deegan <***@baddogconsulting.com>
wrote:

> It should work with recent pip.
> Let me take a look today.
> -Bill
>
> On Thu, Oct 11, 2018 at 6:26 AM Mats Wichmann <***@wichmann.us> wrote:
>
>> On October 11, 2018 3:03:41 AM MDT, "Fux Samuel (ID SIS)" <
>> ***@id.ethz.ch> wrote:
>>>
>>> Hi Bill,
>>>
>>> Thank you for your reply. I updated pip, but scons is still broken:
>>>
>>> [***@lo-login-02 ~]$ pip install --upgrade pip
>>> Collecting pip
>>> Downloading
>>> https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl
>>> (1.3MB)
>>> 100% |████████████████████████████████| 1.3MB 763kB/s
>>> Installing collected packages: pip
>>> Found existing installation: pip 9.0.3
>>> Uninstalling pip-9.0.3:
>>> Successfully uninstalled pip-9.0.3
>>> Successfully installed pip-18.1
>>> [***@lo-login-02 ~]$ pip install scons
>>> Collecting scons
>>> Installing collected packages: scons
>>> Successfully installed scons-3.0.1
>>> [***@lo-login-02 ~]$ scons
>>> SCons import failed. Unable to find engine files in:
>>> /cluster/apps/python/2.7.14_cpu/bin/../engine
>>> /cluster/apps/python/2.7.14_cpu/bin/scons-local-3.0.1
>>> /cluster/apps/python/2.7.14_cpu/bin/scons-local
>>>
>>> /cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/scons-3.0.1
>>> /cluster/apps/python/2.7.14_cpu/lib/scons-3.0.1
>>> /cluster/apps/python/2.7.14_cpu/lib/scons-3.0.1
>>>
>>> /cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons-3.0.1
>>> /cluster/apps/python/2.7.14_cpu/lib/python2.7/site-packages/scons-3.0.1
>>> /cluster/apps/python/2.7.14_cpu/lib/python2.7/site-packages/scons-3.0.1
>>> /cluster/apps/python/2.7.14_cpu/lib64/scons-3.0.1
>>> /cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/scons
>>> /cluster/apps/python/2.7.14_cpu/lib/scons
>>> /cluster/apps/python/2.7.14_cpu/lib/scons
>>>
>>> /cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons
>>> /cluster/apps/python/2.7.14_cpu/lib/python2.7/site-packages/scons
>>> /cluster/apps/python/2.7.14_cpu/lib/python2.7/site-packages/scons
>>> /cluster/apps/python/2.7.14_cpu/lib64/scons
>>> Traceback (most recent call last):
>>> File "/cluster/apps/python/2.7.14_cpu/bin/scons", line 192, in <module>
>>> import SCons.Script
>>> ImportError: No module named SCons.Script
>>> [***@lo-login-02 ~]$
>>>
>>> The following workaround fixes the problem
>>>
>>> export
>>> SCONS_LIB_DIR=/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/scons-3.0.1
>>>
>>> This is not my preferred solution as I would like to avoid setting
>>> environment variables for all users that use Python on our hpc cluster if
>>> it is only required for Scons.
>>>
>>> The issues arises from line 157 in
>>> /cluster/apps/python/2.7.14_cpu/bin/scons:
>>>
>>> temp = [os.path.join(x, 'lib') for x in prefs]
>>>
>>> Because of adding "lib", to the guess for the path of the scons files,
>>> scons searches in
>>>
>>>
>>> /cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/lib/scons-3.0.1
>>>
>>> instead of
>>>
>>> /cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/scons-3.0.1
>>>
>>> After changing
>>>
>>> temp = [os.path.join(x, 'lib') for x in prefs]
>>>
>>> to
>>>
>>> temp = [os.path.join(x, '') for x in prefs]
>>>
>>> scons does not show this error any more:
>>>
>>> [***@lo-login-02 bin]$ scons
>>>
>>> scons: *** No SConstruct file found.
>>> File
>>> "/cluster/apps/python/2.7.14_cpu/lib64/python2.7/site-packages/scons-3.0.1/SCons/Script/Main.py",
>>> line 924, in _main
>>> [***@lo-login-02 bin]$
>>>
>>> I will use this workaround as it avoids setting environment variables.
>>> It is clear to me, that this only fixes the problem on our system, and
>>> maybe for other sites there is a different solution required.
>>>
>>> Would it make sense to open an issue on github to share my findings, as
>>> it seems that many people are facing this problem ?
>>>
>>> - https://github.com/FPGAwars/apio/issues/143
>>> - https://github.com/Homebrew/legacy-homebrew/issues/5794
>>> -
>>> https://stackoverflow.com/questions/24897687/import-failed-unable-to-find-scons-files-import-scons-script
>>> -
>>> https://stackoverflow.com/questions/24897687/import-failed-unable-to-find-scons-files-import-scons-script/32540784
>>> -
>>> http://scons.1086193.n5.nabble.com/SCons-can-t-correctly-install-via-pip-when-not-in-a-virtualenv-td42715.html
>>> -
>>> https://pairlist4.pair.net/pipermail/scons-users/2017-December/006589.html
>>>
>>> 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/
>>> ***@id.ethz.ch
>>> ------------------------------
>>> *Von:* Scons-users [scons-users-***@scons.org]" im Auftrag von
>>> "Bill Deegan [***@baddogconsulting.com]
>>> *Gesendet:* Mittwoch, 10. Oktober 2018 18:42
>>> *An:* SCons users mailing list
>>> *Betreff:* Re: [Scons-users] "pip install scons" result in a broken
>>> installation that is unusable
>>>
>>> Sam,
>>>
>>> Try:
>>>
>>> # update your pip and wheel package there have been significant changes
>>> since py 2.7.14
>>> pip install -U pip wheel
>>> Then retry installing scons.
>>>
>>> -Bill
>>>
>>> On Wed, Oct 10, 2018 at 3:53 AM Fux Samuel (ID SIS) <
>>> ***@id.ethz.ch> wrote:
>>>
>>>> Hi,
>>>>
>>>> I installed scons 3.0.1 with the command
>>>>
>>>> pip install scons
>>>>
>>>> on our hpc cluster, using Python 2.7.14. The installation seems to be
>>>> pretty broken:
>>>>
>>>> [***@lo-login-02 ~]$ *pip install scons*
>>>> Collecting scons
>>>> Installing collected packages: scons
>>>> Successfully installed scons-3.0.1
>>>> You are using pip version 9.0.3, however version 18.1 is available.
>>>> You should consider upgrading via the 'pip install --upgrade pip'
>>>> command.
>>>> [***@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.0.1
>>>> /cluster/apps/python/2.7.14/bin/scons-local
>>>>
>>>> /cluster/apps/python/2.7.14/lib64/python2.7/site-packages/lib/scons-3.0.1
>>>> /cluster/apps/python/2.7.14/lib/scons-3.0.1
>>>> /cluster/apps/python/2.7.14/lib/scons-3.0.1
>>>>
>>>> /cluster/apps/python/2.7.14/lib64/python2.7/site-packages/lib/python2.7/site-packages/scons-3.0.1
>>>> /cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons-3.0.1
>>>> /cluster/apps/python/2.7.14/lib/python2.7/site-packages/scons-3.0.1
>>>> /cluster/apps/python/2.7.14/lib64/scons-3.0.1
>>>> /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
>>>> [***@lo-login-02 ~]$ *which python*
>>>> /cluster/apps/python/2.7.14/bin/python
>>>> [***@lo-login-02 ~]$ *which pip*
>>>> /cluster/apps/python/2.7.14/bin/pip
>>>> [***@lo-login-02 ~]$ *cat /etc/redhat-release *
>>>> CentOS Linux release 7.5.1804 (Core)
>>>> [***@lo-login-02 ~]$
>>>>
>>>> Is this a known problem ?
>>>>
>>>> Can scons be installed with pip without using a virtualenv ?
>>>>
>>>> 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/
>>>> ***@id.ethz.ch
>>>> _______________________________________________
>>>> Scons-users mailing list
>>>> Scons-***@scons.org
>>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>>
>>>
>> there's some dodgy logic in how "prefs" is built up... e.g. look at the
>> 7th item in the list of places it tried. and I see for win32, the
>> expectation is you only need to look in C:\python*, though that is no
>> longer the default location for Python 3 since 3.5. this should get some
>> cleanup, so I'd say there's plenty of justification for filing an issue.
>>
>>
>> --
>> Sent from a mobile device with K-9 Mail. Please excuse my brevity.
>> _______________________________________________
>> Scons-users mailing list
>> Scons-***@scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>
Mats Wichmann
2018-10-11 16:37:55 UTC
Permalink
On 10/11/2018 10:19 AM, Bill Deegan wrote:
> It should work with recent pip.
> Let me take a look today.
> -Bill

IMO, some of the paths are ready as they are and should not be joined
with further bits. a little reorg is needed there.
Mats Wichmann
2018-10-11 17:37:22 UTC
Permalink
On 10/11/2018 10:37 AM, Mats Wichmann wrote:
> On 10/11/2018 10:19 AM, Bill Deegan wrote:
>> It should work with recent pip.
>> Let me take a look today.
>> -Bill
>
> IMO, some of the paths are ready as they are and should not be joined
> with further bits. a little reorg is needed there.

to be a little less cryptic, it seems that the very first place a path
could be added to prefs is here:

# - running from egg check
try:
import pkg_resources
except ImportError:
pass
else:
# when running from an egg add the egg's directory
try:
d = pkg_resources.get_distribution('scons')
except pkg_resources.DistributionNotFound:
pass
else:
prefs.append(d.location)

This stanza succeeds on all kinds of installations, "running from egg"
does not seem precise; whatever get_distribution looks for is found both
in Linux distro packages and pip installed locations. This gives you
back a path that does not want 'lib' or 'lib/pythonX.Y/site-packages'
appended. For example for a particular virtualenv that has pip-install'd
scons, that stanza yields:

/home/mats/.virtualenvs/py27+scons/lib/python2.7

Further down, after the appending that happens in the two list
comprehensions to all the paths in prefs, that expanded to these two:

/home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib
/home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages

which are throwaways, engine will never be found in those after they are
expanded to these four locations on the final round:

/home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/scons-3.0.1
/home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages/scons-3.0.1
/home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/scons
/home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages/scons

there is no site-packages/lib and definitely no
site-packages/lib/.../site-packages - really this is the problem Samuel
is seeing.

What we really wanted to generate from that original first path was:

/home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/scons-3.0.1
/home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/scons
Bill Deegan
2018-10-11 17:45:10 UTC
Permalink
This issue is resolved by patch merged into master in may.
https://github.com/SCons/scons/pull/3134

You can try via package I just uploaded to testpypi
pip install --index-url https://test.pypi.org/simple/
scons==3.1.0.alpha.20181011

Please let me know if this works for you.
I tried in a freshly built python on my linux system.
Seems to work for me.

-Bill



On Thu, Oct 11, 2018 at 1:37 PM Mats Wichmann <***@wichmann.us> wrote:

> On 10/11/2018 10:37 AM, Mats Wichmann wrote:
> > On 10/11/2018 10:19 AM, Bill Deegan wrote:
> >> It should work with recent pip.
> >> Let me take a look today.
> >> -Bill
> >
> > IMO, some of the paths are ready as they are and should not be joined
> > with further bits. a little reorg is needed there.
>
> to be a little less cryptic, it seems that the very first place a path
> could be added to prefs is here:
>
> # - running from egg check
> try:
> import pkg_resources
> except ImportError:
> pass
> else:
> # when running from an egg add the egg's directory
> try:
> d = pkg_resources.get_distribution('scons')
> except pkg_resources.DistributionNotFound:
> pass
> else:
> prefs.append(d.location)
>
> This stanza succeeds on all kinds of installations, "running from egg"
> does not seem precise; whatever get_distribution looks for is found both
> in Linux distro packages and pip installed locations. This gives you
> back a path that does not want 'lib' or 'lib/pythonX.Y/site-packages'
> appended. For example for a particular virtualenv that has pip-install'd
> scons, that stanza yields:
>
> /home/mats/.virtualenvs/py27+scons/lib/python2.7
>
> Further down, after the appending that happens in the two list
> comprehensions to all the paths in prefs, that expanded to these two:
>
> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib
>
> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages
>
> which are throwaways, engine will never be found in those after they are
> expanded to these four locations on the final round:
>
>
> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/scons-3.0.1
>
> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages/scons-3.0.1
> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/scons
>
> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages/scons
>
> there is no site-packages/lib and definitely no
> site-packages/lib/.../site-packages - really this is the problem Samuel
> is seeing.
>
> What we really wanted to generate from that original first path was:
>
> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/scons-3.0.1
> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/scons
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
Fux Samuel (ID SIS)
2018-10-12 05:33:30 UTC
Permalink
Dear Bill,

Thank you for your reply.

For me it still fails:

[***@lo-login-01 ~]$ 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
[***@lo-login-01 ~]$ 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
[***@lo-login-01 ~]$

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:
Execution Requirements

Running SCons requires Python version 2.7.* and Python 3.5 or higher. There should be no other dependencies or requirements to run SCons.

Installation Requirements

Nothing special.

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/
***@id.ethz.ch
________________________________
Von: Scons-users [scons-users-***@scons.org]" im Auftrag von "Bill Deegan [***@baddogconsulting.com]
Gesendet: Donnerstag, 11. Oktober 2018 19:45
An: SCons users mailing list
Betreff: Re: [Scons-users] "pip install scons" result in a broken installation that is unusable

This issue is resolved by patch merged into master in may.
https://github.com/SCons/scons/pull/3134

You can try via package I just uploaded to testpypi
pip install --index-url https://test.pypi.org/simple/ scons==3.1.0.alpha.20181011

Please let me know if this works for you.
I tried in a freshly built python on my linux system.
Seems to work for me.

-Bill



On Thu, Oct 11, 2018 at 1:37 PM Mats Wichmann <***@wichmann.us<mailto:***@wichmann.us>> wrote:
On 10/11/2018 10:37 AM, Mats Wichmann wrote:
> On 10/11/2018 10:19 AM, Bill Deegan wrote:
>> It should work with recent pip.
>> Let me take a look today.
>> -Bill
>
> IMO, some of the paths are ready as they are and should not be joined
> with further bits. a little reorg is needed there.

to be a little less cryptic, it seems that the very first place a path
could be added to prefs is here:

# - running from egg check
try:
import pkg_resources
except ImportError:
pass
else:
# when running from an egg add the egg's directory
try:
d = pkg_resources.get_distribution('scons')
except pkg_resources.DistributionNotFound:
pass
else:
prefs.append(d.location)

This stanza succeeds on all kinds of installations, "running from egg"
does not seem precise; whatever get_distribution looks for is found both
in Linux distro packages and pip installed locations. This gives you
back a path that does not want 'lib' or 'lib/pythonX.Y/site-packages'
appended. For example for a particular virtualenv that has pip-install'd
scons, that stanza yields:

/home/mats/.virtualenvs/py27+scons/lib/python2.7

Further down, after the appending that happens in the two list
comprehensions to all the paths in prefs, that expanded to these two:

/home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib
/home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages

which are throwaways, engine will never be found in those after they are
expanded to these four locations on the final round:

/home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/scons-3.0.1
/home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages/scons-3.0.1
/home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/scons
/home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages/scons

there is no site-packages/lib and definitely no
site-packages/lib/.../site-packages - really this is the problem Samuel
is seeing.

What we really wanted to generate from that original first path was:

/home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/scons-3.0.1
/home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/scons
Bill Deegan
2018-10-12 13:47:14 UTC
Permalink
Do you have wheel installed?
I don't see this problem on a vanilla python 2.7.14 install with a pip
install (no virtualenv) into that tree..
Are you sure you're picking up scons from that path?
can you paste the output of 'which scons' ?


On Fri, Oct 12, 2018 at 1:39 AM Fux Samuel (ID SIS) <***@id.ethz.ch>
wrote:

> Dear Bill,
>
> Thank you for your reply.
>
> For me it still fails:
>
> [***@lo-login-01 ~]$ 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
> [***@lo-login-01 ~]$ 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
> [***@lo-login-01 ~]$
>
>
> 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:
>
> Execution Requirements
>
> Running SCons requires Python version 2.7.* and Python 3.5 or higher.
> There should be no other dependencies or requirements to run SCons.
> Installation Requirements
>
> Nothing special.
>
>
> 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/
> ***@id.ethz.ch
> ------------------------------
> *Von:* Scons-users [scons-users-***@scons.org]" im Auftrag von "Bill
> Deegan [***@baddogconsulting.com]
> *Gesendet:* Donnerstag, 11. Oktober 2018 19:45
> *An:* SCons users mailing list
> *Betreff:* Re: [Scons-users] "pip install scons" result in a broken
> installation that is unusable
>
> This issue is resolved by patch merged into master in may.
> https://github.com/SCons/scons/pull/3134
>
> You can try via package I just uploaded to testpypi
> pip install --index-url https://test.pypi.org/simple/
> scons==3.1.0.alpha.20181011
>
> Please let me know if this works for you.
> I tried in a freshly built python on my linux system.
> Seems to work for me.
>
> -Bill
>
>
>
> On Thu, Oct 11, 2018 at 1:37 PM Mats Wichmann <***@wichmann.us> wrote:
>
>> On 10/11/2018 10:37 AM, Mats Wichmann wrote:
>> > On 10/11/2018 10:19 AM, Bill Deegan wrote:
>> >> It should work with recent pip.
>> >> Let me take a look today.
>> >> -Bill
>> >
>> > IMO, some of the paths are ready as they are and should not be joined
>> > with further bits. a little reorg is needed there.
>>
>> to be a little less cryptic, it seems that the very first place a path
>> could be added to prefs is here:
>>
>> # - running from egg check
>> try:
>> import pkg_resources
>> except ImportError:
>> pass
>> else:
>> # when running from an egg add the egg's directory
>> try:
>> d = pkg_resources.get_distribution('scons')
>> except pkg_resources.DistributionNotFound:
>> pass
>> else:
>> prefs.append(d.location)
>>
>> This stanza succeeds on all kinds of installations, "running from egg"
>> does not seem precise; whatever get_distribution looks for is found both
>> in Linux distro packages and pip installed locations. This gives you
>> back a path that does not want 'lib' or 'lib/pythonX.Y/site-packages'
>> appended. For example for a particular virtualenv that has pip-install'd
>> scons, that stanza yields:
>>
>> /home/mats/.virtualenvs/py27+scons/lib/python2.7
>>
>> Further down, after the appending that happens in the two list
>> comprehensions to all the paths in prefs, that expanded to these two:
>>
>> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib
>>
>> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages
>>
>> which are throwaways, engine will never be found in those after they are
>> expanded to these four locations on the final round:
>>
>>
>> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/scons-3.0.1
>>
>> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages/scons-3.0.1
>> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/scons
>>
>> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages/scons
>>
>> there is no site-packages/lib and definitely no
>> site-packages/lib/.../site-packages - really this is the problem Samuel
>> is seeing.
>>
>> What we really wanted to generate from that original first path was:
>>
>> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/scons-3.0.1
>> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/scons
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-***@scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
Bill Deegan
2018-10-12 14:02:27 UTC
Permalink
Here's what I'm seeing:

~/stow/python-2.7.14/bin/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
***@kufra1:~/devel/scons/tmp$ scons -c
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Cleaning targets ...
scons: done cleaning targets.

This is on a python 2.7.14 I build from scratch on an ubuntu 16.04.5 LTS
system.

Try pip uninstall scons
check that the scons files are gone from /cluster/apps/python/2.7.14
/lib/python2.7/site-packages/scons*

Then try reinstalling.


On Fri, Oct 12, 2018 at 9:47 AM Bill Deegan <***@baddogconsulting.com>
wrote:

> Do you have wheel installed?
> I don't see this problem on a vanilla python 2.7.14 install with a pip
> install (no virtualenv) into that tree..
> Are you sure you're picking up scons from that path?
> can you paste the output of 'which scons' ?
>
>
> On Fri, Oct 12, 2018 at 1:39 AM Fux Samuel (ID SIS) <***@id.ethz.ch>
> wrote:
>
>> Dear Bill,
>>
>> Thank you for your reply.
>>
>> For me it still fails:
>>
>> [***@lo-login-01 ~]$ 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
>> [***@lo-login-01 ~]$ 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
>> [***@lo-login-01 ~]$
>>
>>
>> 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:
>>
>> Execution Requirements
>>
>> Running SCons requires Python version 2.7.* and Python 3.5 or higher.
>> There should be no other dependencies or requirements to run SCons.
>> Installation Requirements
>>
>> Nothing special.
>>
>>
>> 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/
>> ***@id.ethz.ch
>> ------------------------------
>> *Von:* Scons-users [scons-users-***@scons.org]" im Auftrag von "Bill
>> Deegan [***@baddogconsulting.com]
>> *Gesendet:* Donnerstag, 11. Oktober 2018 19:45
>> *An:* SCons users mailing list
>> *Betreff:* Re: [Scons-users] "pip install scons" result in a broken
>> installation that is unusable
>>
>> This issue is resolved by patch merged into master in may.
>> https://github.com/SCons/scons/pull/3134
>>
>> You can try via package I just uploaded to testpypi
>> pip install --index-url https://test.pypi.org/simple/
>> scons==3.1.0.alpha.20181011
>>
>> Please let me know if this works for you.
>> I tried in a freshly built python on my linux system.
>> Seems to work for me.
>>
>> -Bill
>>
>>
>>
>> On Thu, Oct 11, 2018 at 1:37 PM Mats Wichmann <***@wichmann.us> wrote:
>>
>>> On 10/11/2018 10:37 AM, Mats Wichmann wrote:
>>> > On 10/11/2018 10:19 AM, Bill Deegan wrote:
>>> >> It should work with recent pip.
>>> >> Let me take a look today.
>>> >> -Bill
>>> >
>>> > IMO, some of the paths are ready as they are and should not be joined
>>> > with further bits. a little reorg is needed there.
>>>
>>> to be a little less cryptic, it seems that the very first place a path
>>> could be added to prefs is here:
>>>
>>> # - running from egg check
>>> try:
>>> import pkg_resources
>>> except ImportError:
>>> pass
>>> else:
>>> # when running from an egg add the egg's directory
>>> try:
>>> d = pkg_resources.get_distribution('scons')
>>> except pkg_resources.DistributionNotFound:
>>> pass
>>> else:
>>> prefs.append(d.location)
>>>
>>> This stanza succeeds on all kinds of installations, "running from egg"
>>> does not seem precise; whatever get_distribution looks for is found both
>>> in Linux distro packages and pip installed locations. This gives you
>>> back a path that does not want 'lib' or 'lib/pythonX.Y/site-packages'
>>> appended. For example for a particular virtualenv that has pip-install'd
>>> scons, that stanza yields:
>>>
>>> /home/mats/.virtualenvs/py27+scons/lib/python2.7
>>>
>>> Further down, after the appending that happens in the two list
>>> comprehensions to all the paths in prefs, that expanded to these two:
>>>
>>> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib
>>>
>>> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages
>>>
>>> which are throwaways, engine will never be found in those after they are
>>> expanded to these four locations on the final round:
>>>
>>>
>>> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/scons-3.0.1
>>>
>>> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages/scons-3.0.1
>>> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/scons
>>>
>>> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages/scons
>>>
>>> there is no site-packages/lib and definitely no
>>> site-packages/lib/.../site-packages - really this is the problem Samuel
>>> is seeing.
>>>
>>> What we really wanted to generate from that original first path was:
>>>
>>>
>>> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/scons-3.0.1
>>> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/scons
>>>
>>> _______________________________________________
>>> Scons-users mailing list
>>> Scons-***@scons.org
>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-***@scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>
Mats Wichmann
2018-10-12 14:41:56 UTC
Permalink
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.
Fux Samuel (ID SIS)
2018-10-15 09:02:21 UTC
Permalink
@Bill: Thank you for your reply.

Wheel is installed, but still the problem persists:

[***@lo-login-02 ~]$ pip uninstall scons
Skipping scons as it is not installed.
[***@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
[***@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
[***@lo-login-02 ~]$ which scons
/cluster/apps/python/2.7.14/bin/scons
[***@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
[***@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:
[***@lo-login-02 ~]$ pip uninstall scons
Skipping scons as it is not installed.
[***@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
[***@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
[***@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
[***@lo-login-02 ~]$ which scons
~/.local/bin/scons
[***@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
[***@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/
***@id.ethz.ch

________________________________________
Von: Scons-users [scons-users-***@scons.org]&quot; im Auftrag von &quot;Mats Wichmann [***@wichmann.us]
Gesendet: Freitag, 12. Oktober 2018 16:41
An: scons-***@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.
Bill Deegan
2018-10-15 13:56:48 UTC
Permalink
Please try:

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


On Mon, Oct 15, 2018 at 5:03 AM Fux Samuel (ID SIS) <***@id.ethz.ch>
wrote:

> @Bill: Thank you for your reply.
>
> Wheel is installed, but still the problem persists:
>
> [***@lo-login-02 ~]$ *pip uninstall scons*
> Skipping scons as it is not installed.
> [***@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
> [***@lo-login-02 ~]$ *pip install --index-url
> https://test.pypi.org/simple/ <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
> [***@lo-login-02 ~]$ *which scons*
> /cluster/apps/python/2.7.14/bin/scons
> [***@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
> [***@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:
>
> [***@lo-login-02 ~]$ *pip uninstall scons*
> Skipping scons as it is not installed.
> [***@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
> [***@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
> [***@lo-login-02 ~]$ *pip install --user --index-url
> https://test.pypi.org/simple/ <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
> [***@lo-login-02 ~]$* which scons*
> ~/.local/bin/scons
> [***@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
> [***@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/
> ***@id.ethz.ch
>
> ________________________________________
> Von: Scons-users [scons-users-***@scons.org]&quot; im Auftrag von
> &quot;Mats Wichmann [***@wichmann.us]
> Gesendet: Freitag, 12. Oktober 2018 16:41
> An: scons-***@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-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
Mats Wichmann
2018-10-16 00:05:25 UTC
Permalink
On 10/15/2018 07:56 AM, Bill Deegan wrote:
> Please try:
>
> *pip install --index-url https://test.pypi.org/simple/
> <https://test.pypi.org/simple/> scons==3.1.0.alpha.20181015*

I goofed and didn't check an earlier reply and it went just to Samuel,
but I had asked him to try the latest scons.py after you merged the
recent PR, and that worked for him. Hopefully we'll get an affirmative
to this test PyPi package as well.
Fux Samuel (ID SIS)
2018-10-16 05:29:30 UTC
Permalink
Using pip install works with the new version.


[***@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
[***@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
[***@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/
***@id.ethz.ch
________________________________
Von: Scons-users [scons-users-***@scons.org]" im Auftrag von "Bill Deegan [***@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) <***@id.ethz.ch<mailto:***@id.ethz.ch>> wrote:
@Bill: Thank you for your reply.

Wheel is installed, but still the problem persists:

[***@lo-login-02 ~]$ pip uninstall scons
Skipping scons as it is not installed.
[***@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
[***@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
[***@lo-login-02 ~]$ which scons
/cluster/apps/python/2.7.14/bin/scons
[***@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
[***@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:
[***@lo-login-02 ~]$ pip uninstall scons
Skipping scons as it is not installed.
[***@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
[***@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
[***@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
[***@lo-login-02 ~]$ which scons
~/.local/bin/scons
[***@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
[***@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/
***@id.ethz.ch<mailto:***@id.ethz.ch>

________________________________________
Von: Scons-users [scons-users-***@scons.org<mailto:scons-users-***@scons.org>]&quot; im Auftrag von &quot;Mats Wichmann [***@wichmann.us<mailto:***@wichmann.us>]
Gesendet: Freitag, 12. Oktober 2018 16:41
An: scons-***@scons.org<mailto:scons-***@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.
Bill Deegan
2018-10-16 12:49:05 UTC
Permalink
great news!

Hopefully this resolves the list of pip related issues on github as well.

-Bill

On Tue, Oct 16, 2018 at 1:29 AM Fux Samuel (ID SIS) <***@id.ethz.ch>
wrote:

> Using pip install works with the new version.
>
>
> [***@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
> [***@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
> [***@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/
> ***@id.ethz.ch
> ------------------------------
> *Von:* Scons-users [scons-users-***@scons.org]" im Auftrag von "Bill
> Deegan [***@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/
> <https://test.pypi.org/simple/> scons==3.1.0.alpha.20181015*
>
>
> On Mon, Oct 15, 2018 at 5:03 AM Fux Samuel (ID SIS) <***@id.ethz.ch>
> wrote:
>
>> @Bill: Thank you for your reply.
>>
>> Wheel is installed, but still the problem persists:
>>
>> [***@lo-login-02 ~]$ *pip uninstall scons*
>> Skipping scons as it is not installed.
>> [***@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
>> [***@lo-login-02 ~]$ *pip install --index-url
>> https://test.pypi.org/simple/ <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
>> [***@lo-login-02 ~]$ *which scons*
>> /cluster/apps/python/2.7.14/bin/scons
>> [***@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
>> [***@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:
>>
>> [***@lo-login-02 ~]$ *pip uninstall scons*
>> Skipping scons as it is not installed.
>> [***@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
>> [***@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
>> [***@lo-login-02 ~]$ *pip install --user --index-url
>> https://test.pypi.org/simple/ <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
>> [***@lo-login-02 ~]$* which scons*
>> ~/.local/bin/scons
>> [***@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
>> [***@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/
>> ***@id.ethz.ch
>>
>> ________________________________________
>> Von: Scons-users [scons-users-***@scons.org]&quot; im Auftrag von
>> &quot;Mats Wichmann [***@wichmann.us]
>> Gesendet: Freitag, 12. Oktober 2018 16:41
>> An: scons-***@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-***@scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>> _______________________________________________
>> Scons-users mailing list
>> Scons-***@scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
Loading...