pip is a package and cannot be directly executed

Viewed 26250

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

3 Answers

Instead of

pip [...]

Try doing

python -m pip [...]

Can't really help more without more info.

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

For newer version ie. using pip3:

pip3 install -U <<package name>>
Related