ModuleNotFoundError: No module named 'tensorflow.contrib.framework' - python

When i import tflearn in Python, it says ModuleNotFoundError: No module named 'tensorflow.contrib.framework', does someone know how to deal with this issue? Thanks.
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\User\Anaconda3\lib\site-packages\tflearn_init_.py", line 4, in
from . import config
File "C:\Users\User\Anaconda3\lib\site-packages\tflearn\config.py", line 5, in
from .variables import variable
File "C:\Users\User\Anaconda3\lib\site-packages\tflearn\variables.py", line 7, in
from tensorflow.contrib.framework.python.ops import add_arg_scope as contrib_add_arg_scope
ModuleNotFoundError: No module named 'tensorflow.contrib.framework'

The error message suggests the module is not installed/found.
For example, I do not have tflearn installed, but I have tensorflow installed.
>>> from tensorflow.contrib.framework.python.ops import add_arg_scope
>>> import tflearn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tflearn'
Try importing the whole tensorflow module and see if you are getting the same error. If so, try reinstalling the tensorflow module.

Related

pyproj.database and pyproj.aoi import failed

I have installed the pyproj.2.6.1 version, and I am using the python3.8.8; I can't correctly import the module query_utm_crs_info from pyproj package.
Here below the code :
from pyproj import Proj, Transformer, CRS
from pyproj.database import query_utm_crs_info
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pyproj.database'
Similar problem with AreaOfInterest
from pyproj.aoi import AreaOfInterest
and I received this message
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pyproj.aoi'
However, if I change it in to
from pyproj.transformer import AreaOfInterest
Any suggestions ?
https://pyproj4.github.io/pyproj/stable/api/database.html#pyproj.database.query_crs_info
query_crs_info was added in pyproj 3.

ModuleNotFoundError: No module named 'tensorflow.contrib' while making chatbot

So I'm following a tutorial and making a chatbot in python and I'm using the tflearn and tensorflow modules, and when I run my code I get the following error:
Traceback (most recent call last):
File "/home/user/Coding Projects/chatbot/main.py", line 6, in <module>
import tflearn
File "/home/user/.local/lib/python3.8/site-packages/tflearn/__init__.py", line 4, in <module>
from . import config
File "/home/user/.local/lib/python3.8/site-packages/tflearn/config.py", line 5, in <module>
from .variables import variable
File "/home/user/.local/lib/python3.8/site-packages/tflearn/variables.py", line 7, in <module>
from tensorflow.contrib.framework.python.ops import add_arg_scope as contrib_add_arg_scope
ModuleNotFoundError: No module named 'tensorflow.contrib'
I can't figure out how to fix it, and was wondering if someone could help me.
check your tensorflow version(you can to check it like that)
`
import tensorflow as tf
print(tf.__version__)
`
tensorflow contrib was removed from tensorflow 2.0 and its functionallty was moved to other modules.

library importing issues in pycharm

I'm doing a project on opencv python which is based on downloaded source code from the internet. When I run the code, this error occurs
C:\Users\Udara\AppData\Local\Programs\Python\Python38-32\python.exe C:/Users/Udara/Desktop/7777/people-counting-opencv/people_counter.py
Traceback (most recent call last):
File "C:/Users/Udara/Desktop/7777/people-counting-opencv/people_counter.py", line 13, in <module>
from pyimagesearch.centroidtracker import CentroidTracker
File "C:\Users\Udara\Desktop\7777\people-counting-opencv\pyimagesearch\centroidtracker.py", line 5, in <module>
import ordereddict
File "C:\Users\Udara\AppData\Local\Programs\Python\Python38-32\lib\site-packages\ordereddict.py", line 23, in <module>
from UserDict import DictMixin
ModuleNotFoundError: No module named 'UserDict'

ModuleNotFoundError: No module named darkflow.cli and 'nms'

I am trying out YOLO tutorial at https://github.com/llSourcell/YOLO_Object_Detection
When I do the step:
flow --h
I got this error:
File "/anaconda2/bin/flow", line 4, in <module>
from darkflow.cli import cliHandler
ImportError: No module named darkflow.cli
I have tried to find solution everywhere but no luck. Then I tried skip that line and continue...
flow --model cfg/yolo-new.cfg --load bin/yolo-tiny.weights --train --gpu 1.0
I got this error:
Traceback (most recent call last):
File "flow", line 4, in <module>
from darkflow.cli import cliHandler
File "./YOLO_Object_Detection/darkflow/cli.py", line 3, in <module>
from .net.build import TFNet
File "./YOLO_Object_Detection/darkflow/net/build.py", line 7, in <module>
from .framework import create_framework
File "./YOLO_Object_Detection/darkflow/net/framework.py", line 1, in <module>
from . import yolo
File "./YOLO_Object_Detection/darkflow/net/yolo/__init__.py", line 2, in <module>
from . import predict
File "./YOLO_Object_Detection/darkflow/net/yolo/predict.py", line 7, in <module>
from ...cython_utils.cy_yolo_findboxes import yolo_box_constructor
File "darkflow/cython_utils/cy_yolo_findboxes.pyx", line 1, in init darkflow.cython_utils.cy_yolo_findboxes
import numpy as np
ModuleNotFoundError: No module named 'nms'
Any help appreciated. Thank you
Both problems are discussed at the issue tracker.
*ImportError: No module named darkflow.cli
https://github.com/llSourcell/YOLO_Object_Detection/issues/3
You have to build the cython modules:
cd ./cython_utils
python3 setup.py build_ext --inplace
cd ..
ModuleNotFoundError: No module named 'nms'
https://github.com/llSourcell/YOLO_Object_Detection/issues/7
See https://keponk.wordpress.com/2017/12/07/siraj-darkflow/ for installation using conda.

How to install a patch for numpy?

I am trying to install OpenBayes, but I get an error, that the numarray is not found.
>>> from OpenBayes import BNet
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\OpenBayes\__init__.py", line 7, in
<module>
from bayesnet import *
File "C:\Python27\lib\site-packages\OpenBayes\bayesnet.py", line 23, in
<module>
import numarray as na
ImportError: No module named numarray
>>>
As I got it, the numarray is now replaced by numpy.
There is a patch for Numpy here: https://github.com/willasaywhat/OpenBayes-Fork
But don't know how to install it.
I use Python 2.7 and have Win10/
Thanks for any info about this module!

Categories

Resources