Pip installs to unexpected place
rbowman
bowman at montana.com
Mon Apr 14 17:56:13 EDT 2025
On Mon, 14 Apr 2025 09:55:09 -0400, Thomas Passin wrote:
> Pip doesn't know about the environment it runs in. It seems to me that
> you didn't active the venv before you installed using pip. So nothing
> would have gotten installed into the venv. So where is the venv that you
> set up? I usually put them into ~/venv. For example, a venv named "gf4"
> is at ~/venv/gf4.
Are you sure about that? activate has
VIRTUAL_ENV="/home/rbowman/work/python/weather"
export VIRTUAL_ENV
_OLD_VIRTUAL_PATH="$PATH"
PATH="$VIRTUAL_ENV/bin:$PATH"
export PATH
$PATH is modified to point to the bin directory in the venv, and it
includes python and pip. You can use 'python3' if you really want to since
it is there also.
$ which pip
/home/rbowman/work/python/weather/bin/pip
'deactivate' restores $PATH.
I'll agree it sounds like the venv wasn't activated.
More information about the Python-list
mailing list