The directory you stated is indeed the default directory as stated here https://unix.stackexchange.com/questions/240037/why-did-pip-install-a-package-into-local-bin What happens when you explicitly state the location where you want to store the package? Have you tried it?
On Thu, Mar 5, 2020, 9:45 PM Skip Montanaro <skip.montan...@gmail.com> wrote: > I originally sent this to the code-quality list, but in retrospect (and > considering the crickets), I think c.l.py would have been a better > starting > point. > > ------------------------------------------------ > > I'm working on Python from GitHub, so have a fork which I check out > and keep synced with the main repo. I run pylint on my code (which is > nominally aimed at finding its way into Python someday), so installed > it using pip: > > ./python -m pip install --user pylint > > (I prefer to tie pylint to the Python version I'm working on, if for > no other reason than that as Python 3.9alpha moves along, this might > flag something needing the Pylint team's attention.) This downloads > whatever is necessary and installs it. Unfortunately, instead of > creating a #! line of something like > > #!/home/skip/src/python/cpython/python > > it generates > > #!/usr/local/bin/python3.9 > > I didn't specify any sort of --prefix location when I configured, as I > don't intend to install the code I'm working on. Mostly I just run > "make test." I saw nothing like an --inplace flag in either Python's > configure or pip's help output. It's not at all clear that I should > give --prefix=$(pwd) to pip as I think that would install all > subsidiary modules (pylint, astroid, etc) inside my Python sandbox. Is > there some way coax pip into referencing my sandbox python executable, > or will I be forced to edit the relevant command scripts once they are > installed in ~/.local/bin? > > Thanks, > > Skip Montanaro > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list