I have been trying to install both tensorflow and keras in Rstudio with no succes, always having the same error.
Many thanks in advance.
This is my code:
devtools::install_github("rstudio/tensorflow")
devtools::install_github("rstudio/keras")
library(keras)
library(tensorflow)
install_tensorflow()
install_keras()
Error in tensorflow::install_tensorflow(method = match.arg(method), conda = conda, :
Unable to install TensorFlow on this platform.Binary installation is only available for 64-bit platforms.
I am running a 64 bit platform, I dont understand how to fix this.
Related
I am working on a jupyter notebook script which I used last year to train a neural network.
When I try to import the keras tokenizer:
from keras.preprocessing.text import Tokenizer
I receive this error
I have seen other posts which suggest that I need to update tensorflow. My anaconda environment tells me I have 1.13.1 installed. But when I try to update tensorflow-base to 1.15 in the anaconda navigator, I receive this error:
I can update tensorflow from my command line using:
conda install tensorflow=1.15.0
But this doesn't update tensorflow in my anaconda environment and the error persists in my notebook.
Any help would be much appreciated! As you can probably tell, I am a novice python user.
The error says some packages needed to update Tensorflow/Andaconda requires Python 3.11 or newer. Since not all of the error log can be seen however, I would upgrade to python 3.7 to be safe. You can download this from the official page: https://www.python.org/downloads/
If the problem persists, try using pip to update the packages(In bash) :
pip install tensorflow
pip install conda
If you get an error while using pip, try:
pip3 install tensorflow
pip3 install conda
This same method can be used to update keras:
pip install keras
or if that does not work:
pip3 install keras
If pip is not recognized at a command, Python 3.7 is not added to path. I do not have experience with macOS, but this article should go into enough depth.
https://realpython.com/add-python-to-path/#how-to-add-python-to-path-on-linux-and-macos
i followed the instructions given by the official tf documentation, but i just cannot resolve the various problems encountered.
Did anyone have the experience installing tff on m1 mac and can show me your overall process?
conda create -n federated python=3.8
conda activate federated
pip install --upgrade tensorflow_federated
everything seems to be fine according to the terminal output, however,
after
import tensorflow_federated as tff
i got a RunTimeError:
RuntimeError: This version of jaxlib was built using AVX instructions, which your CPU and/or operating system do not support. You may be able work around this issue by building jaxlib from source.
how to resolve this?
I created an env and imported TensorFlow but I get the error:
Keras requires TensorFlow 2.2 or higher
TensorFlow at this env is 2.3, so I don't know why I get this error.
the way to solve the problem is to create a new virtual environment
python 3.7
tesorflow 1.15.2
or uninstall any previously installed tensorflow and install 1.15.2
i'm not sure why this worked though.
Jupyter Notebook kernel dies when importing tensorflow 1.5.0
I have read a lot of posts relating to this but they have all had higher version numbers of tensorflow and have solved it by downgrading to 1.5.0. I also had higher version number and followed the advice to downgrade but I still have the problem.
Does anyone know what to try next?
pip install h5py==2.8.0
worked for me
When trying using the command prompt I got an error message not related to the tensorflow issue (I think);
"Warning! HDF5 library version mismatched error"
The key information from that message body was "Headers are 1.10.1, library is 1.10.2" so I downgraded hdf5 library by "conda install -c anaconda hdf5=1.10.1" and now the error message is gone and the kernel does not die when importing tensorflow.
I got similar problems, any tensorflow or tensorflow related packages (e.g. keras) made my kernel to die when loading, from any interface (jupyter, spyder, console....)
For those having this kind of problems, try running python from the console with verbose mode (python -v) then import tensorflow and look for errors.
I spot errors related to h5py, similar to the reply of #DBSE. I just upgraded the h5py package then everything was solved !
If you are using a conda environment, then the easiest method for fixing this issue is to just create a new environment and install tensorflow with just a single command. I had the same issue, I have tried a lot on most of the version of python and tensorflow. But at the last I have successfully configured it with just a single steps.
Run this command for installing GPU version
conda create --name tf_gpu tensorflow-gpu
The above line of code will automatically install that version of python and tf which is comaptible with your GPU or CPU.
For CPU, Run this command
conda create --name tf_env tensorflow
Both of these command work 100 % with my system for GPU and CPU access and will download the latest version which are compatible with system. It will resolved/fixed "Illegal Instruction (code dumps)" error.
pip install h5py==3.1.0
This is the most updated version which worked for me.
Try using import numpy before Keras and Tensorflow.
Trying to install Tensorflow in windows7 with CPU support only.
The installation was successful using a native pip, as instructed in tensorflow site. But i am not able to validate the installation. It is generating an error message instead of printing Hello, Tensorflow.
error showing- tf is not defined,.
sees is not defined.
the screenshot of the error: [1]: https://i.stack.imgur.com/hFLvr.png
Working
py -m 3.6 pip install tensorflow
The lack of AVX instruction in CPU can cause this error.
Try this wheel for python3.6