Reputation: 133
Im trying to install google assistant on my Raspberry Pi, but when I keep getting an error: pip is a package and cannot be directly executed
Upvotes: 4
Views: 35855
Reputation: 15611
I had the same problem. I think it was an outcome of a failed
> .\python.exe -m pip install --upgrade pip
do to some environment misconfiguration.
So it first removed the existing version 10.0.1, and then the installation of the new version 22.3.1 failed, leaving me with no pip
.
From official documentation, I ran
> .\python.exe -m ensurepip --upgrade
which restored the original pip 10.0.1. Then I fixed the environment problem, and then again
> .\python.exe -m pip install --upgrade pip
I now have pip 22.3.1.
Upvotes: 0
Reputation: 85575
For newer version ie. using pip3:
pip3 install -U <<package name>>
Upvotes: 0
Reputation: 22992
I think your version of pip
is old. You need to upgrade it first, like this:
pip install -U pip
You may need to upgrade setuptools too:
pip install -U setuptools
Since google-assistant-library
is available as a wheel, you need to install wheel
too:
pip install wheel
I don't know if you can do that with Raspberry Pi, but I recommend you to used a virtualenv. That way, you have a fresh and isolated Python executable and a recent version of pip
.
virtualenv your_proj
source your_proj/bin/activate
pip install wheel
pip install google-assistant-library
Upvotes: 1
Reputation: 1112
Instead of
pip [...]
Try doing
python -m pip [...]
Can't really help more without more info.
Upvotes: 1