ModuleNotFoundError: No module named 'firebase_admin' - python

Im currently having issues importing modules in my venv on vscode for google cloud firestore.
import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore
pip -V shows python 3.8.
python -V shows Python 3.8.1.
using pip freeze, the module appears here.
firebase-admin==5.0.3
however it returns
ModuleNotFoundError: No module named 'firebase_admin'
ive triedfrom google.cloud import firestore as well but it returns ModuleNotFoundError: No module named 'google.cloud'
any help here?

Fixed it by running in python terminal. Somehow using run code in python results in this error. Could possibly be due to interpeter configuration issues

Related

Python azure-servicebus throws circular import error for ServiceBusClient and ServiceBusMessage

After installing azure servicebus from pypl( azure-servicebus 7.3.4 ) using pip, i am trying those provided sample code from https://pypi.org/project/azure-servicebus/.
It gives error:
from azure.servicebus import ServiceBusClient
ImportError: cannot import name 'ServiceBusClient' from partially initialized module 'azure.servicebus' (most likely due to a circular import) (C:\python\lib\site-packages\azure\servicebus_init_.py)
I am using windows10.
other azure services like FaceAPI and CustomVision libraries are working fine.
Just this ServiceBus is throwing error.
I am new to azure in python. Any kind help of help is highly appreciable.
Make sure you don’t have any of your working .py file named like ServiceBusClient.py or ServiceBusMessage.py or azure_servicebus.py which can conflict with Python/ServiceBus package installed files.
If you are using Python 3.8.9, you can try installing the lower version of azure-servicbus as answered by Frank Gong
pip install azure-servicebus==7.0.0
You can refer to ImportError: cannot import name '...' from partially initialized module '...' (most likely due to a circular import), Circular Import Error while importing create_engine in Sqlalchemy, and ImportError: cannot import name 'ServiceBusClient' from 'azure.servicebus'
You can refer to the available Azure Service Bus libraries for Python

unable to use python module inside a brownie script: ModuleNotFoundError

Brownie framework community:
please help. I'm trying to use an external python module, PyGithub, in my python script in the scripts folder. I've pip installed it:
pip install PyGithub
In scripts/create.py, I try to import it:
from github import Github <----- error
from brownie import accounts, convert
def main(): ...
however, when I try running it:
brownie run create.py
I get the error:
ModuleNotFoundError: No module named 'github'
The import statement works perfectly fine in python. Any suggestions on how to resolve this? thanks

no simple json module in python 3.7

I am trying import 'simplejson'module into in my pycharm project. It is throwing an error saying that import simplejson as json
ModuleNotFoundError: No module named 'simplejson'
I installed simple json in the terminal using pip3 install simplejson.
I have tried not renaming it as json but that didn't work.

from google.cloud import speech_v1 ---- ModuleNotFoundError: No module named 'google'

I use Cloud Shell Console to write python code that uses Google Speech to Text
Steps taken:
Google cloud shell console to write the code
gcloud app deploy
Error message:
File "/home/vmagent/app/main.py", line 3, in <module> from google.cloud import speech_v1 ModuleNotFoundError: No module named 'google'
pip list run on the console shows that 'google' is included
Try using pip3 instead of pip.
It took me hours to find out the files had been in another directory all along.

how to clear this error ? No module named "tweepy"

I tried using the following command to import tweepy in my system into the folder- c/python27/Scripts/tweepy :
git clone https://github.com/tweepy/tweepy.git
cd tweepy
python setup.py install
But, when i tried to import tweepy and use it in my program, i'm still getting error as:
"No module named tweepy"
My programs are in c:/Users/xxxx/.spyder-py3/, what else should i do to correct this error.

Categories

Resources