-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If using an external Python, the bin directory might not be in PATH #32662
Comments
This was also reported in #31939. It seems to be due to distro-specific patches to the system Python. Only current workaround is to use Spack-installed Python instead of system Python. |
Any chance spack could just add |
That would break a lot of external packages. For example, imagine you have Python 3.7 in - spec: python
prefix: /usr which will it pick up? |
After just running into this (with |
It looks like there was some recent discussion on this in https://discuss.python.org/t/linux-distro-patches-to-sysconfig-are-changing-pip-install-prefix-outside-virtual-environments/18240/27 by @pradyunsg and @FFY00, not sure if they have anything else to add. |
No, not yet unfortunately, but shouldn't users be using a Spack-provided Python? |
Spack supports using external installations of all packages. A lot of users who don't care about Python and just need it as a dependency for their HPC code will use an external copy of Python instead of letting Spack built it from source to save time. We have a |
For anyone who encounters this issue, see pypa/pip#10978 for the upstream tracking issue. For now, the best workaround is to use a Spack-installed Python instead of using the system Python. This issue has been reported several times already:
I've closed these issues so we can track this issue in only a single place. |
Steps to reproduce
If you install a python package, the resulting files will be located in
<prefix>/local
instead of<prefix>
. While this doesn't seem to be a problem for importing the module, it is a problem when the python package installs executables inbin
. These executables end up in<prefix>/local/bin
, which in not inPATH
when loading the package or when in an environment that contains the package.To reproduce, simply try installing a python package that has executables (e.g.
py-flake8
), then try to use said executable.Error message
No response
Information on your system
General information
spack debug report
and reported the version of Spack/Python/PlatformThe text was updated successfully, but these errors were encountered: