This is bit opposite to #2191 and I commented there about invalid path.
Here is long story...today I saw following error:
$ spack module refresh
....
File "..../spack/var/spack/repos/builtin/packages/python/package.py", line 223, in setup_dependent_environment
raise RuntimeError('Cannot locate python executable')
RuntimeError: Cannot locate python executable
Was wondering why python executable is suddenly an issue. Then realise @BarrySmith added logic to detect PYTHONHOME in #2173. That looks all good. My packages.yaml has always been like:
python:
paths:
python@2.7.10: /System/Library/Frameworks/Python.framework/Versions/2.7
Looking at installed packages, I saw that the python package silently appears in the installed packages and with the prefix path that doesn't exist. (Note that this doesn't happen right away but I think when I install dependent packages and stuff....) :
→ spack find -p python
==> 2 installed packages.
-- darwin-elcapitan-x86_64 / clang@3.9.0 ------------------------
python@2.7.10 xxx/spack/opt/spack/darwin-elcapitan-x86_64/clang-3.9.0/python-2.7.10-izyruuenr4wd7d4ssfeotod2tqz7g4kz
......
→ ll xxx/spack/opt/spack/darwin-elcapitan-x86_64/clang-3.9.0/python-2.7.10-izyruuenr4wd7d4ssfeotod2tqz7g4kz
ls: xxx/spack/opt/spack/darwin-elcapitan-x86_64/clang-3.9.0/python-2.7.10-izyruuenr4wd7d4ssfeotod2tqz7g4kz: No such file or directory
Now how to get around this issue? I tried to uninstall packages (which I never installed!), reindex, purge etc.. :
spack uninstall -af python
==> The following packages will be uninstalled :
....
==> Do you want to proceed ? [y/n]
y
==> Removed stale DB entry for python@2.7.10%clang@3.9.0~tk~ucs4 arch=darwin-elcapitan-x86_64-izyruue
==> Removed stale DB entry for python@2.7.10%gcc@4.9.3~tk~ucs4 arch=darwin-elcapitan-x86_64-mdqov5t
spack reindex
spack purge -as
Is removing database safe option? or something else?
This is bit opposite to #2191 and I commented there about invalid path.
Here is long story...today I saw following error:
Was wondering why python executable is suddenly an issue. Then realise @BarrySmith added logic to detect
PYTHONHOMEin #2173. That looks all good. Mypackages.yamlhas always been like:python: paths: python@2.7.10: /System/Library/Frameworks/Python.framework/Versions/2.7Looking at installed packages, I saw that the
pythonpackage silently appears in the installed packages and with theprefixpath thatdoesn'texist. (Note that this doesn't happen right away but I think when I install dependent packages and stuff....) :→ spack find -p python ==> 2 installed packages. -- darwin-elcapitan-x86_64 / clang@3.9.0 ------------------------ python@2.7.10 xxx/spack/opt/spack/darwin-elcapitan-x86_64/clang-3.9.0/python-2.7.10-izyruuenr4wd7d4ssfeotod2tqz7g4kz ...... → ll xxx/spack/opt/spack/darwin-elcapitan-x86_64/clang-3.9.0/python-2.7.10-izyruuenr4wd7d4ssfeotod2tqz7g4kz ls: xxx/spack/opt/spack/darwin-elcapitan-x86_64/clang-3.9.0/python-2.7.10-izyruuenr4wd7d4ssfeotod2tqz7g4kz: No such file or directoryNow how to get around this issue? I tried to uninstall packages (which I never installed!),
reindex,purgeetc.. :Is removing database safe option? or something else?