Comments (26)
I've dealt with this problem (in conda env on Ubuntu 18.04):
pip uninstall tensorflow protobuf --yes
find $CONDA_PREFIX -name "tensorflow" | xargs -Ipkg rm -rfv pkg
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.9.0-cp36-cp36m-linux_x86_64.whl --no-cache-dir
from probability.
This appeared to be fixable with the following steps:
- uninstalling tensorflow
- uninstalling protobuf
- reinstalling tensorlfow (which should come along with the correct protobuf version.
from probability.
FWIW if you're using a local install (pip install --user
) rather than conda you can replace the second command with this:
find ~/.local/ -name "tensorflow" | xargs -Ipkg rm -rfv pkg
from probability.
The problem is that you updated the tensorflow but not tensorflow_gpu.
pip install --upgrade tensorflow
pip install --upgrade tensorflow-gpu
Best wishes.
from probability.
I suspect this is not fixed by the protobuf version but rather by the reinstall of tensorflow which installs 1.8.0 I assume. I built 1.9.0 from source and see the same error.
What I can see is that the _impl folder is missing under the site-packages
folder of the keras package included in tensorflow. hence, the resolution fails.
But it seems to have something to do with this commit
manually deleting the tensorflow
folder inside the virtual environment and reinstalling the locally installed variant helped. I assume it has something to do with __pycache__
files.
from probability.
I got the problem too. Tensorflow 1.8.0 was installed as sudo and Tensorflow 1.10.0 installed as user triggered the problem.
sudo pip3 uninstall tensorflow
pip3 install tensorflow
solved it.
from probability.
@rodrigob did you found solution?
I have same error (windows 10, anaconda) at from keras import backend as K
File "\Anaconda3\envs\art\lib\site-packages\tensorflow\python\keras\engine\__init__.py", line 21, in <module>
from tensorflow.python.keras.engine.base_layer import InputSpec
File "\Anaconda3\envs\art\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 33, in <module>
from tensorflow.python.keras import backend
File "\Anaconda3\envs\art\lib\site-packages\tensorflow\python\keras\backend\__init__.py", line 22, in <module>
from tensorflow.python.keras._impl.keras.backend import abs
ImportError: cannot import name 'abs'
from probability.
@Tarunyellogi I installed 1.8 instead 1.9 and its worked for me
from probability.
Deleting the virtualenv which stored caches of tensorflow installation did the trick. Making a new env, and then installing tensorflow again likely installed the packages afresh.
from probability.
Hello everyone,
Please make a new environment. I was struggling the whole day with this problem. I was about to quit but for the last time I decided to create a new environment and it worked.
from probability.
which protobuf version is supported? thanks!
from probability.
hi, I got the same problem with my program, but neither reinstalling tf nor deleting the folder worked.
I have problems with installing via web, so I download the wheel files of the modules and use pip install locally.
I'm trying to run tf 1.9.0 and I'm trying with all the latest releases of the submodules.
any hints on what to try?
from probability.
thank you very much
from probability.
Thank you!
from probability.
I also encounter this problem. I have installed tensorflow 1.8.0 before and I just pip install tensorflow-gpu==1.9.0.
Then import tensorflow as tf, I saw this error.
So I uninstall tensorflow 1.8.0 and reinstall tensorflow-gpu 1.9.0.
And the error is gone! The problem is solved.
from probability.
Same problem. Uninstalling & reinstalling did not help :(
from probability.
Hi,
I am using tensorflow 1.10.0
I agree with matthew-mcateer, It worked on my machine by uninstalling tensorflow and protobuf and reinstalling tensorflow.
from probability.
@rdinse good point -- the original solution also has this problem (except for conda). I guess if you have more important things in .local then you should rm with more care :)
from probability.
Hey Dok11 , im getting the same error, please ping me if you got any solution for that.
https://www.linkedin.com/in/tarun-yellogi-51b41466/
from probability.
I have the same issue that Dok11 and Tarunyellogi
from probability.
Deleting directories of older tensorflow installations (after uninstalling tf) and then installing tf-1.10.0 worked for me.
from probability.
Hi,
1-) conda uninstall tensorflow-gpu and conda uninstall protobuf,
2-) Deleting directories of older tensorflow installations,
3-) conda install tensorflow-gpu==1.8
worked for me.
but, conda install tensorflow-gpu==1.10 not worked for me.
from probability.
The answer from AramNaseer solved this . But when I upgraded the tensofflow and tensorflow-gpu got this error - tensorflow cannot load libcublas.so.9 (I had cuda 8 installed, now need to upgrade it and hope everything else works)
"As our installation pages list, prebuilt TF pip packages on pypi are built with CUDA 9.0 support only:
https://www.tensorflow.org/install/gpu"
tensorflow/tensorflow#20569 (comment)
from probability.
how to create a new environment
from probability.
I got the problem too. Tensorflow 1.8.0 was installed as sudo and Tensorflow 1.10.0 installed as user triggered the problem.
sudo pip3 uninstall tensorflow pip3 install tensorflow
solved it.
worked for me
from probability.
This appeared to be fixable with the following steps:
- uninstalling tensorflow
- uninstalling protobuf
- reinstalling tensorlfow (which should come along with the correct protobuf version.
worked for me
- pip uninstall tensorflow
- pip uninstall protobuf
- pip install tensorflow==1.4.0
from probability.
Related Issues (20)
- MultivariateNormal* constructor crashes with Numpy 2.0 HOT 1
- Please clean up [email protected] mailing list. HOT 1
- instructions to build wheel from source not working HOT 1
- Mixture of tuple-valued distributions for TFP on JAX raises a TypeError
- Bayesian MCMC model and Bayesian regression analysis model HOT 2
- `JointDistribution`s yield different PRNG behaviour on GPU and CPU
- MLE of lambda parameter in PowerTransform bijector HOT 3
- AttributeError: Tensorflow-Probabilty does not have right attribute HOT 4
- Saving a Keras model that includes a mixture layer (e.g. MixtureNormal) might be unsafe
- How to build a bayesion hierarchical/multilevel modeling with tf-keras? HOT 5
- Unsafe variable naming in `JointDistributionCoroutine` HOT 5
- tf.keras and tfp.tfp.layers. are not compatible
- When using tfp.optimizer.lbfgs_minimize, encountered OperatorNotAllowedInGraphError: Iterating over a symbolic `tf.Tensor` is not allowed:
- Run fit_with_hmc with jit_compile activated
- New release for TF 2.17, JAX 4.31+? HOT 2
- how can i use tfp.math.psd_kernels.Polynomial, with feature_ndims=6,
- Something wrong with the creation of a Keras model with probabilistic layers. HOT 1
- Normal Inverse Gaussian and Softplus NaN Gradient
- Tracing only a subset of state variables in mcmc.sample_chain
- Error in HamiltonianMonteCarlo when using gather in log_prob function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from probability.