which() command can find executable only with ./

Bader charge density analysis

Moderator: moderators

Post Reply
Posts: 1
Joined: Tue Feb 09, 2021 11:27 am

which() command can find executable only with ./

Post by Villelaa »

I'm using pymatgen, which has a class BaderAnalysis . This class needs a executable called bader (binary from another source), so it checks if the file is there or not using which(). I do have the file and i can run the bader program manually, but I always get the error that the file isn't there. If I try the which() command manually it turns out that it only finds it with the prefix ./

Output: None


How can I make it in a way that the which command finds it without the prefix? (because the pymatgen class literally runs if not which("bader") or which("bader.exe"): 'error message' when initializing the class.
Post Reply