When I try to import firebase_admin
in python 2.7
I get the error:
ImportError: No module named google.auth
This is the DockerFile I'm using.
I've installed Python from the source code using
wget https://www.python.org/ftp/python/2.7/Python-2.7.tgz
tar xvzf Python-2.7.tgz
cd Python-2.7
./configure
make
make install
Then I've installed pip and firebase admin by running:
apt-get install -y python-pip
pip install firebase-admin
Then I ran import firebase_admin
inside the python shell.
I got the error:
ImportError: No module named google.auth
I've run pip show google.auth
and got the following output:
Name: google-auth
Version: 1.6.3
Summary: Google Authentication Library
Home-page: https://github.com/GoogleCloudPlatform/google-auth-
library-python
Author: Google Cloud Platform
Author-email: [email protected]
License: Apache 2.0
Location: /usr/local/lib/python2.7/dist-packages
Requires: cachetools, six, pyasn1-modules, rsa
I've run echo $PYTHONPATH
and got this:
/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages
That means the google.auth
is installed and its directory is in the PYTHONPATH
, why python can't find it? and how to fix it?