mdshw5 / pyfaidx

Efficient pythonic random access to fasta subsequences
https://pypi.python.org/pypi/pyfaidx
Other
459 stars 75 forks source link

python3.8 pip install with --user, on mac, doesn't install faidx script #182

Closed rsharris closed 2 years ago

rsharris commented 2 years ago

This is not important to me, but I felt I should report it.

The pipy page advises me that after I do a pip install with --user, I should "make sure to add /home/$(whoami)/.local/bin to your $PATH if you want to run the faidx script.'

I realize the path given there is linux centric and my path on a mac will be different. But I don't find a file named faidx (with no extension) anywhere on my machine. And snooping into pyfaidx-0.6.3.1-py3.8.egg-info/installed-files.txt doesn't reveal such a file either. I do find .../site-packages/pyfaidx/cli.py, and comparing its help text with that shown in this repo's README for the "cli script: faidx" suggests that this is the same thing.

My guess is the install intended to copy or symlink cli.py into some place appropriate, but that this failed during my install.

mdshw5 commented 2 years ago

Thanks for reporting this. You're right that the README instructions are very linux-specific. On macOS it's going to depend on which version of python (the system version or one installed with macports/homebrew) you're using. And of course the path will be different for pyfaidx installed in a virtualenv. On my mac, running pip install pyfaidx and then which faidx produces /usr/local/bin/faidx. I'll update the README with more generic guidance.

mdshw5 commented 2 years ago

@rsharris I slightly misunderstood your report here. After running pip install --user pyfaidx on my macOS 11.6 system I see a warning:

 WARNING: The script faidx is installed in '/Users/shirlma2/Library/Python/3.9/bin' which is not on PATH.

This tells me that I'd have to add this directory to my $PATH in order to use the faidx script. I'm not confident that this directory structure is the same across different macOS and python versions, but hopefully this helps. I'll leave this issue open until you confirm that the script installed properly for you!

rsharris commented 2 years ago

@mdshw5 Thanks, Matt

I didn't see such a warning during my install.

The good news is that I DO see faidx in /Users/myusername/Library/Python/3.8/bin. I didn't find that during the automated search I made before my initial post (I may have been looking for faidx.py). That directory isn't in my PATH, but that DOES look like the correct place for faidx to reside.

Not sure if my python version qualifies as the system version. I installed it from a .pkg file downloaded from https://www.python.org/downloads. I'm also running macOS 10.14.6 on this machine, FWIW. I'm also using python 3.8 rather than 3.9. And my pip is a couple versions behind the latest.

I'd say close this again. I don't think it's worth investigating why I didn't get that message.

Bob H

mdshw5 commented 2 years ago

Thanks for confirming! Yeah - I think python distribution on macOS has been a bit strange in the past, and I'm glad to have more inclusive instructions.