<div id="comment:0"></div> This code from #29024 ``` os.environ["SINGULAR_BIN_DIR"] = dirname(which("Singular")) ``` assumes that `Singular` is in PATH This causes errors when users attempt to use sagelib outside of the environment set up by `sage-env`. https://groups.google.com/g/sage-support/c/XBxpl-JjaNU/m/FtRvcoW0AgAJ Depends on #31292 Depends on #31296 CC: @orlitzky @dimpase @koffie Component: **refactoring** Author: **Matthias Koeppe** Branch/Commit: **[`4cd3130`](https://github.com/sagemath/sagetrac-mirror/commit/4cd31308ac154f4d23e69b3706fb54023834d0e5)** Reviewer: **Dima Pasechnik** _Issue created by migration from https://trac.sagemath.org/ticket/33440_