I'm a beginner in Deep Learning and NLP stream. I was trying to install Tensorflow but it is giving me an error. Can anyone please help me how to solve this?
This is the error I'm getting
I was watchig an YouTube video for Toxic Comment Classification and thought should try that out for better practice. After creating an enviroment for the file I triedd to install Tensorflow but it threw this error. I updated my Anaconda, Updated python to 3.11 and pip to 22.3 but still it is not working.
Welcome to Stack Overflow!!
Have you tried installing each package indivually?
Like this
pip install tensorflow
pip install tensorflow-gpu
And so on
I ran your CLI commands from the picture separately as-well.
The error you are getting is from tensorflow-gpu command.
I've found a link for you, from where you can learn about it. [link]
Related
I'm trying to install tensorflow and I get this error. How do I fix this?
I am very new to coding so small words would be helpful. P.S. I'm using miniconda3 if that's important
I have some models I trained using TF and have been using for awhile now but since V2.8 came out I am having issues with the models based in MobileNetV3 (large and small), I posted the issue on the tensor-flow git and am waiting for a solution. In the mean time I wan to make some predictions on colab using V2.7 instead of 2.8. I know this involves installing CUDA and and cuDNN. I am really in experienced at this level and setting up TF. does anyone know how to proceed with this? I saw this post but was hoping for a less intensive solution. like can I 'flash' an old colab machine that has 2.7 setup?
as a side note, shouldn't colab have options like this? the main reason I am using colab is that I can run my code anywhere and that it is repeatable.
also I can install and run my code for V2.7 for the CPU version but I want to run on the GPU.
thanks for your help!
edit: sorry I did a poor job at explaining what I already tried. I have tired using pip
!pip install --upgrade tensorflow-gpu==2.7.*
!pip install --upgrade tensorflow==2.7.*
but I get this error
UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
I have also pip uninstalled keras, TF and TF-GPU before installing and I get the same error. yes I restart the runtime as well. someone mentioned that conda tried to install everything when installing TF, is this a possible solution?
I am working on a machine learning project on Google Colab, it seems recently there is an issue when trying to import packages from transformers. The error message says:
ImportError: cannot import name 'SAVE_STATE_WARNING' from 'torch.optim.lr_scheduler' (/usr/local/lib/python3.7/dist-packages/torch/optim/lr_scheduler.py)
The code is simple as follow:
!pip install transformers==3.5.1
from transformers import BertTokenizer
So far I've tried to install different versions of the transformers, and import some other packages, but it seems importing any package with:
from transformers import *Package
is not working, and will result in the same error. I wonder if anyone is running into the same issue as well?
Change the torch version in colab by running this command
!pip install torch==1.4.0. Then, It worked for me.
Just change the version of tranformers to the latest one (4.5.1 at this time). That worked in colab.
!pip install transformers
The same issue occurred to me with the PyTorch version after being upgraded.
As for the solution downgrade Pytorch version to 1.4.0.
Use the below command to install
!pip install -q torch==1.4.0 -f https://download.pytorch.org/whl/cu101/torch_stable.html
It's solved a lot of problems with transformers also.
The above from udara vimukthi worked for me after trying a lot of different things, trying to get the code for "Getting started with Google BERT" to work after cloning the gitHub repository locally, so now ALL of the chapter code works while I'm showing my daughter the models.
Operating system - Windows. Running locally with GPU support, using Anaconda environment.
pip install -q --user torch==1.4.0 -f https://download.pytorch.org/whl/cu101/torch_stable.html
then I ran into some more issues and had to install the ipwidgets
pip install ipywidgets
Now it all works, as far as I've gotten. Thanks for the help with the above suggestion it saved me a lot of headaches. :)
This's my first time to ask question on stack overflow, thanks for the browse of my question!
While I'm trying to debug a program(written in python) in Visual Studio Code, as I enter "python .\dnn_example.py", it doesn't output the result, but blocked out this message(the white frame, and it means "which software do I prefer to use to open the file):enter image description here
Then I saw a message from "PROBLEMS":enter image description here
It reads "unable to import tensorflow".
I'm keep trying fixing the problem, thanks for your help!
It seems like you have not installed tensorflow. Try installing it using conda by conda install tensorflow or if you don't use conda, install it using pip by pip install tensorflow.
If you want to run tensorflow on GPU then follow this tutorial.
I am trying to debug an error with tensorflow. When I import tensorflow
I get the following error
import tensorflow as tf
terminate called after throwing an instance of 'Xbyak::Error'
what(): internal error
Aborted (core dumped)
Here are the install details
OS >> Ubuntu 14.04
Install Method Anaconda >> conda 4.4.11 (conda install tensorflow)
python3 --version >> Python 3.6.4 :: Anaconda, Inc.
If anyone has experience or knowledge on how to fix this issue, I would be most grateful. A search here, on google and on github yielded suggested the issue is likely with MKL-DNN, has anyone found a work around?
As others have mentioned, it is probably a better practice to install from source using official documentation:
https://www.tensorflow.org/install/install_linux#installing_with_anaconda
That's the only method which google supports.
The conda forge version (1.5.0) works fine. Using
conda install -c conda-forge tensorflow
p.s.: Make sure you don't edit as that will throw back the original error.
As stated in my comment, I had the same problem as you. Anaconda seems to not fully support tensorflow or have an older version, because when I installed tensorflow using pip install tensorflow I had no problems. I hope this solves it for you as well.
Even I kept getting this error when I created another environment and installed TF in it. Seems like Tensorflow is the main issue here. What did solve my problem was I simply installed Tensorflow using this command pip3 install tensorflow. I hope this solves your problem.
Just got the same error using the conda distribution. Tried the source forge version and it worked great. but the conda is TF 1.7 and the source forge is 1.5.