[TriLUG] Python help?
Jos Purvis via TriLUG
trilug at trilug.org
Tue Oct 8 14:51:58 EDT 2024
On Tue, Oct 8, 2024, at 14:49, Brian McCullough via TriLUG wrote:
> On Tue, Oct 08, 2024 at 02:41:30PM -0400, Jos Purvis wrote:
>> The most common issue for this that I've seen is that pip is busy installing the plugin to a different version of Python than the script is calling. For instance, the script may be calling /usr/local/bin/python (which is Python 3.11) while /usr/local/bin/pip is actually an alias to /usr/local/bin/pip3, which is tied to a Python 3.12 install.
>>
>> I would check by comparing 'pip --version' and 'python --version' to see if they're pointing at the same Python install.
>
> I thought that I had done so, but again ( they seem to be slightly
> different ):
>
> $ pip --version
> pip 23.0.1 from
> /home/bdmc/work2/starlette-example/lib/python3.11/site-packages/pip
> (python 3.11)
>
> $ python --version
> Python 3.11.2
>
> python3 is the same answer.
>
> Python does not say where it is coming from, but both of these answers
> are from within the active virtual environment.
Hmm. And I'm guessing 'which python' and 'which pip' will return values within the virtualenv — is the shebang on the python script calling something like 'env python' to ensure it's not calling the system python outside the virtualenv bubble?
More information about the TriLUG
mailing list