I'm trying to to be able to run this demo https://github.com/ZheC/Realtime_Multi-Person_Pose_Estimation
I'm running ubuntu 14.04
I have installed Anaconda, and after installing many many many dependencies another one pops. It also requires python caffe
So I installed it with this command:
(I also tried Pip install caffe but if failed)
Conda install caffe
But then when I try to run it I get:
$python
>>> import caffe
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/gtkratosman-lap/anaconda2/lib/python2.7/site-packages/caffe/__init__.py", line 1, in <module>
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
File "/home/gtkratosman-lap/anaconda2/lib/python2.7/site-packages/caffe/pycaffe.py", line 13, in <module>
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: libprotobuf.so.12: cannot open shared object file: No such file or directory
I have been able to verify this behaviour in my own Anaconda environment running conda v4.3.27 in a Python v2.7.14 virtual environment, installing caffe v1.0.0rc5.
Having looked further into the issue, it seems it relates to the following open Anaconda issue: caffe needs to pin protobuf requirement to version #6733
As described in the issue:
The caffe and caffe-gpu package in defaults has a requirement on protobuf without any version dependencies. Unfortunately, the caffe packages links to libprotobuf.so.12 which is provided by the protbuf version 3.2.0
As such, I found I was able to successfully import caffe in Python, running in my Anaconda virtual environment, by first manually installing protobuf v3.2.0, as follows: conda install protobuf==3.2.0
Related
So I have installed tensorflow with pip using pip install tensorflow==1.15 a few days ago, today I wanted to search for my models-master file and I didn't find it. I uninstalled tensorflow using pip uninstall tensorflow and then I installed it from the github and added it to the folder of the project I am working on like, it is in the same folder as the .py files of my original project. This is because I need to use protoc on the files because I got error messages before. I think I got the protoc part down now but I can't test it, because whenever I want to run my main file, I get this error message:
Traceback (most recent call last):
File "C:\Users\user\Desktop\captcha solver\main_.py", line 1, in <module>
from CAPTCHA_object_detection import *
File "C:\Users\user\Desktop\captcha solver\CAPTCHA_object_detection.py", line 18, in <module>
from object_detection.utils import ops as utils_ops
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\object_detection\utils\ops.py", line 291, in <module>
dtype=tf.float32):
AttributeError: module 'tensorflow' has no attribute 'float32'
I think this is because of the way I installed tensorflow, but I don't know what I did wrong, I have never installed modules without pip though.
I am following a Real time object detection on https://automaticaddison.com/real-time-object-recognition-using-a-webcam-and-deep-learning/#top and I have hit a road block I followed all the instructions and checked for any errors but still got this error
(I am using windows)
Traceback (most recent call last): File "object_detection_test.py",
line 15, in <module>
from utils import label_map_util File "C:\Users\1rock\Documents\TensorFlow\models\research\object_detection\utils\label_map_util.py",
line 27, in <module>
import tensorflow.compat.v1 as tf ModuleNotFoundError: No module named 'tensorflow.compat.v1'
I used pip install --ignore-installed --upgrade tensorflow==1.9 just what the link above said and whilst running I got these packages and their versions and an error hope it would be relevant to the question
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
ipywidgets 7.6.0 requires jupyterlab-widgets>=1.0.0, which is not installed.
Successfully installed absl-py-0.11.0 astor-0.8.1 gast-0.4.0 grpcio-1.34.0 importlib-metadata-3.3.0 markdown-3.3.3 numpy-1.19.4 protobuf-3.14.0 setuptools-51.0.0.post20201207 six-1.15.0 tensorboard-1.9.0 tensorflow-1.9.0 termcolor-1.1.0 typing-extensions-3.7.4.3 werkzeug-1.0.1 wheel-0.36.2 zipp-3.4.0
I used pip install --ignore-installed --upgrade tensorflow==1.9
line 27, in
import tensorflow.compat.v1 as tf ModuleNotFoundError: No module named 'tensorflow.compat.v1'
TF 1.9 and earlier do not have compat module. To use it you need TF 1.10+. Its better to use conda install everywhere possible with conda virtual enviroment.
Also since you are using tensorflow models make sure you has corresponding version of repository, for example latest TF1.x version located here
I'm struggling to just install and import Caffe on my windows 10's Anaconda. I really don't know why such a well-known deep-learning package is that hard to just install!
First, I tried to install it. With huge difficulties, I did the following and at last, apparently, the installation was successful:
conda create -n caffe python=3.7
// activate the environment REM Depending on your conda version you may have to use activate Caffe
conda activate caffe
// add the anaconda channel to resolve all dependencies
conda config --add channels anaconda
// Install caffe with cuda support or install caffe-cpu if you do not want CUDA support
conda install caffe-cpu -c willyd
And now, just trying to import caffe, I get this error:
>>> import caffe
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\user\AppData\Local\Continuum\anaconda3\envs\caffe\lib\site-packages\caffe\__init__.py", line 1, in <module>
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
File "C:\Users\user\AppData\Local\Continuum\anaconda3\envs\caffe\lib\site-packages\caffe\pycaffe.py", line 13, in <module>
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: DLL load failed: The specified module could not be found.
What should I do? How to fix it?
I made some log files using tensorboard but I can't access them.
Using
tensorboard or tensorboard --logdir=logs/ on the command prompt
gives the following error:-
C:\Users\User>tensorboard
Traceback (most recent call last):
File "C:\Users\User\Anaconda3\Scripts\tensorboard-script.py", line 6, in <module>
from tensorboard.main import run_main
File "C:\Users\User\Anaconda3\lib\site-packages\tensorboard\main.py", line 40, in <module>
from tensorboard import default
File "C:\Users\User\Anaconda3\lib\site-packages\tensorboard\default.py", line 38, in <module>
from tensorboard.plugins.beholder import beholder_plugin
File "C:\Users\User\Anaconda3\lib\site-packages\tensorboard\plugins\beholder\__init__.py", line 15, in <module>
from tensorboard.plugins.beholder.beholder import Beholder
File "C:\Users\User\Anaconda3\lib\site-packages\tensorboard\plugins\beholder\beholder.py", line 25, in <module>
from tensorboard.plugins.beholder import im_util
File "C:\Users\User\Anaconda3\lib\site-packages\tensorboard\plugins\beholder\im_util.py", line 89, in <module>
class PNGDecoder(util.PersistentOpEvaluator):
AttributeError: module 'tensorboard.util' has no attribute 'PersistentOpEvaluator'
I tried this solution, but it did not help.
I also had a big fight with this problem. What eventually worked for me was the following:
pip uninstall tensorflow
pip uninstall tensorboard
conda show OR pip show --> have a look at which other tensorflow related packages you have installed and remove them.
Go to site-packages and remove tensorflow/tensorboard folders (look for any folder in your filesystem related to a tensorflow / tensorboard installation)
conda clean --all (not sure if this is necessary, but it was one of
my steps and might be relevant)
Reinstall tensorflow and tensorboard. Preferably use conda as it is faster by several orders of magnitude
One of my main sources in solving this issue was this github issue thread:
https://github.com/tensorflow/tensorboard/issues/1724
Try to install these packages with Conda Run:
conda install -c anaconda tensorflow-gpu
conda install -c anaconda keras
I tried to install tensorflow cpu using pip in my windows8.1 64bit python3.6.0
using pip install tensorflow
but it gives me this error:
Traceback (most recent call last): File "C:\Users\Laitooo
San\Desktop\tf.py", line 1, in <module>
import tensorflow as tf File "C:\Users\Laitooo San\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\__init__.py",
line 24, in <module>
from tensorflow.python import * File "C:\Users\Laitooo San\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\__init__.py",
line 52, in <module>
from tensorflow.core.framework.graph_pb2 import * File "C:\Users\Laitooo
San\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\core\framework\graph_pb2.py",
line 6, in <module>
from google.protobuf import descriptor as _descriptor File "C:\Users\Laitooo
San\AppData\Local\Programs\Python\Python36\lib\site-packages\google\protobuf\descriptor.py",
line 47, in <module>
from google.protobuf.pyext import _message ImportError: DLL load failed: The specified procedure could not be found.
I downloaded python36.dll and made sure all other .dll is there and install Microsoft visual c++ 2015
I also uninstalled tensorflow and installed another version several times but without any result.
I had this error as well, and was able to resolve it by downgrading protobuf from 3.6.1 to 3.6.0:
pip install protobuf==3.6.0
windows 10
python 3.6
Cuda 9.0
cudnn-9.0-windows10-x64-v7.6.3.30
tensorflow-gpu == 1.12.0
keras == 2.2.4
problem was:
ImportError: DLL load failed: The specified procedure could not be
found.
solved with:
pip install protobuf==3.6.0
There is a similar issue on Github:
Tensorflow issue
Problem should be resolved if you install the wheel file provided in one of the answers. You can find the wheel file here.
Wheel file
You can install the wheel file with pip. First change the current directory to install location. Then,
pip install tensorflow-1.6.0-cp36-cp36m-win_amd64.whl
All official tensorflow binaries since 1.6 were made with AVX, rendering older CPUs unsupported.
In order to install recent tensorflow versions on an older CPU you can simply install tensorflow from a non-avx built wheel ( you can find some here)
pip install <path to the downloaded .whl file>
its the problem with python=3.6.0
Upgrade to any higher versions of python 3.6
Updating from python 3.6.0 to python 3.6.4 fixed this issue for me.
I got this (unhelpful) error after installing on python 3.7. Turns out I had not installed cuDNN, the neural network package. After that, it runs without issue.
I had the same problem.
I made it work by uninstalling scipy and then reinstalling.
First uninstall seaborn.
pip uninstall seaborn
then uninstall scipy.
pip uninstall scipy.
After that install both scipy and seaborn.
pip install scipy,
pip install seaborn
I hope it helps