My Caffe was running fine but then I installed Keras which gave the following error:
'module' object has no attribute 'MutableMapping'
According to some advice, I updated Protobuf following these instructions of building from sources.
https://github.com/protocolbuffers/protobuf/blob/master/src/README.md
And the result now is that neither Keras nor Caffe is running and I get the same error:
File "/home/myuser/anaconda2/lib/python2.7/site-packages/google/protobuf/descriptor.py", line 50, in <module>
from google.protobuf.pyext import _message
AttributeError: 'module' object has no attribute 'MutableMapping'
Of all the things, I would perhaps first try to uninstall the new version of Protobuf but how should I do it to go back to the previous state? And secondly, how to install the Protobuf so that Keras can also run?
The issue seemed to be having two protobuf installations at the same time.
Related
I have used pip install rdkit-pypi to install rdkit library. But when I type import rdkit as rd, it shows the error
ImportError: DLL load failed while importing rdBase: The specified module was not found.
I am using Anaconda as a base. What should I do to work with rdkit library?
I previously encountered this problem. After some reading, I came to know that the python version above 3.8.0 would not be compatible with rdkit. Even you need to change your base to rdkit.
I solve this by first downgrading the anaconda version with the python version lower than 3.8.0.
then I set my rdkit environment.
In this image u can see my python version and I'm not getting any error
In second image u can see my base to my-rdkit-envs
I get the error:
AttributeError: module 'statsmodels.tsa.api' has no attribute 'DynamicFactorMQ'
model = sm.tsa.DynamicFactorMQ(
endog_m, endog_quarterly=endog_q,
factors=factors, factor_orders=factor_orders,
factor_multiplicities=factor_multiplicities)
This error is most likely coming up because you have an older version of Statsmodels installed. DynamicFactorMQ was introduced in version 0.12, so you should make sure that you're using a new enough version. You can check using:
import statsmodels.api as sm
print(sm.__version__)
When using Hugginface Transformers on GLUE task, I've got the error AttributeError: 'MrpcProcessor' object has no attribute 'tfds_map'
I suspect a problem of compatibility.
My solution was to simply to downgrade the version of transformers to 2.2.0
pip uninstall transformers -y
pip install transformers==2.2.0
Right now I am using transformers 2.11.0 and this code works for me:
# First we create an empty Byte-Pair Encoding model (i.e. not trained model)
tokenizer = Tokenizer(BPE())
tokenizer.normalizer = Sequence([
NFKC(),
Lowercase()
])
So there seems to be a constructor which you can use.
When I use pymc3 to construct a normal distribution, I got error message. How to solve this problem?
I installed PyMC3 with windows Anaconda (version Anaconda3-2019.03-Windows-x86_64.exe). And running codes from official pymc3 tutorial "Getting started with PyMC3".
I tried to build a normal distribution with Normal constructor pm.Normal(). The codes are listed below
import numpy as np
import pymc3 as pm
basic_model = pm.Model()
with basic_model:
# Priors for unknown model parameters
alpha = pm.Normal('alpha', mu=0, sigma=10)
But got error message as the following:
AttributeError: module 'numpy.core.multiarray' has no attribute '_get_ndarray_c_version'
The problem is solved by removing theano 1.0.3 from Anaconda and performing pip install the latest version >=1.0.4.
There is no problem when I import IPython.parallel -->import IPython.parallel
However, when I try this:
rc=IPython.parallel.Client()
I get the following error:
/home/mycomputer/local/lib/python2.7/site-packages/IPython/utils/shimmodule.pyc in __getattr__(self, key)
90 return import_item(name)
91 except ImportError:
---> 92 raise AttributeError(key)
AttributeError: Client
Does anyone know the solution to this?
[I am using Ubuntu 14.04]
It might be a problem with IPython 4.0's shim. IPython.parallel has moved to a new package, ipyparallel, so if you are using 4.0:
import ipyparallel
rc = ipyparallel.Client()
It's possible that the failure is that you don't have ipyparallel, and you are getting an unfortunately uninformative failure instead of a nice, useful error message. In that case:
pip install --upgrade ipyparallel
(or conda install, depending on your Python packaging of choice).