I keep getting this error: ModuleNotFoundError: No module named 'object_detection' - tensorflow

Iam using jupyter notebook.
I have already installed object_detection module using:
pip install object-detection-api
But keep getting this error.
Help somebody.
Thank you in advance.

Related

ModuleNotFoundError: No module named 'absl'

I followed instructions (https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html) to install the Tensorflow Object Detection API. I use Anaconda on ubuntu18.4 and all of the steps in the instructions seemed to complete OK.
When I train to train my model with the following command:
python model_main_tf2.py --model_dir=models/my_ssd_resnet50_v1_fpn --pipeline_config_path=models/my_ssd_resnet50_v1_fpn/pipeline.config
I get the following error:
Traceback (most recent call last):
File "model_main_tf2.py", line 31, in <module>
from absl import flags
ModuleNotFoundError: No module named 'absl'
I get the error mentioned in the headline. I would be very thankful if someone could help me with a code example to solve the problem.
You need the absl package; to install it, use either one of the following:
pip install absl-py
or if you are in a Conda environment:
conda install -c anaconda absl-py

ImportError: No module named 'numpy.testing.nosetester'

I am facing an issue when I run 'from sklearn.model_selection import train_test_split' in jupyter notebook. I tried to upgrade/reinstall numpy, scipy and pandas but still cannot fix the problem. Please help. Thanks in advance.
Upgrade numpy/scipy.
( Possible duplicate:
ModuleNotFoundError: No module named 'numpy.testing.nosetester' )
Using Python3:
pip3 install numpy==1.16.4

ModuleNotFoundError: No module named 'pyspark' on emr cluster

I have created an EMR cluster along with Jupyter notebook and chose Pyspark for it. When I tried to import pyspark it gave me an error: "ModuleNotFoundError: No module named 'pyspark'". I have run pip install pyspark and it seems like it was installed successfully but still gives me the same error. How can this be fixed?
Any help would be much appreciated.

ModuleNotFoundError: No module name 'Cython'

I am trying to install pandas module on PyCharm. When i try to install it it gave me this error: "ModuleNotFoundError: No module name 'Cython' " (Screen: https://prnt.sc/qafwcy)
So i went on the CMD to try to install the Cython package with this command: py -m pip install Cython , which gave me an other error: "The script, f2py.exe is install in 'C:\xxx.xxxx, which is not a PATH. (Screen: https://prnt.sc/qafvx3)
Does anyone had the same problem and know how to fix it?
Thank you
Pycharm uses a virtual environment - one separate from your python install on your computer. This is to isolate your development environment from the one you would use on your computer.
Enter your pip commands here instead:

Object Detection API error: "ImportError: cannot import name anchor_generator_pb2"

I'm trying to get Tensorflow's new Object Detection API working. I've followed the installation instructions, but when running the command
python object_detection/builders/model_builder_test.py
I get the following error
from object_detection.protos import anchor_generator_pb2
ImportError: cannot import name anchor_generator_pb2
I've looked inside object_detection.protos, and there doesn't seem to be anything named anchor_generator_pb2. Has anyone else managed to get this command to run, or solved this issue?
Missed a step in the installation instructions, where the following needs to be run from models/research:
protoc object_detection/protos/*.proto --python_out=.
You need to rerun the below command after that:
pip install .
This worked for me
Run it from your models/research
python setup.py
protoc -I=./ --python_out=./ ./object_detection/protos/*.proto
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim