Closed ssnn-airr closed 3 years ago
Original comment by Jason Vander Heiden (Bitbucket: javh, GitHub: javh).
Greetings @{557058:df44f0a2-58fd-4eb1-b7ff-d4a73e3f133d} , there’s two things going on here:
-1. The package contains both API and executable components. The typical behavior of a python package is to install the API bits into $PYTHONUSERBASE/lib
and the scripts into $PYTHONUSERBASE/bin
. The location of $PYTHONUSERBASE
varies with the OS and python install. It looks like you figured this out as I was writing this, so… it’s just a matter of putting the bin directory into your $PATH
-2. The issue with the example script is because the default installation of readlink
on Mac OS is not the GNU version and, hence, does not have the -f
argument. When we wrote this script we didn’t check it outside linux, so that’s our mistake.
You can either (1) remove the readlink
commands from the beginning of the script and just put in the absolute (or correct relative) paths to the input files or (2) install greadlink
(by installing coreutils
via homebrew) and alias it to readlink
or replace readlink
with greadlink
in the script.
Either way, we should fix the example script so it’s cross-platform.
Original comment by Rian Stockbower (Bitbucket: rianjs, GitHub: rianjs).
Yes, sir, those two changes did it, and the example is working great in both zsh and bash. Thank you for your help.
(Random aside: it's been many years since I've felt so out of my depth, at something I should ostensibly be good at. Each platform has its own conventions and idiosyncracies. To me, ASP.NET Core and C# are as easy as breathing, but a few hours in Python, and I feel like I'm stumbling around in the dark! Ah well, at least the underpinning CS concepts are fundamental, even if the platforms are not.)
Original comment by Jason Vander Heiden (Bitbucket: javh, GitHub: javh).
Sure thing.
Yeah, python is a bit weird on Mac. Python 2 is EOL, but it’s still the base install in Mac OS, so you have to go fetch a third party install of Python 3. The directory structure isn’t the same as on *nix at all and depends on the install source. I personally find homebrew
the easiest way to manage it (over anaconda or the official packages), because it gives you general purpose apt/dnf/rpm like inferface.
Original report by Rian Stockbower (Bitbucket: rianjs, GitHub: rianjs).
I feel like I'm missing something simple and obvious, but I can't get the Jiang2013 example to work. I'm not a Python developer, but I do have about a decade of professional experience as a software developer in other ecosystems, so I'm not totally ignorant.
This is what I did, starting from a fresh install of macOS:
I launched the python3 REPL, and quickly tested biopython, and had no problems. My test was fairly simple:
Weird. MacOS did recently switch to zsh as the default shell, but it still has bash, not that it should matter given the script header. Nonethless, I launched bash, and tried running it again: same result.
So I went looking for FilterSeq.py, and the other files that are associated with pRESTO:
I explored some of the subdirectories, and there was nothing that looked promising. (ls -la didn't show anything else.)
So I downloaded the raw tarball from pypi, and decompressed it. Poking around, I DO see FilterSeq.py, et al in the bin folder, which looks like the meat of pRESTO:
I went back to /Users/rianjs/Library/Python/3.9/lib/python/site-packages/presto, and there is NOTHING like that in there. I did a find, just to see, and nothing showed up:
Is the macOS package broken in some way?