I want to use keras in Jupyter. Running command "import tensorflow as tf" tells me that tensorflow cannot be found. "pip install tensorflow" says tensorflow cannot be found. From here i got a better command:
py -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
This worked better, because this time there was progess. But an error was encountered - failed to build wheel for h5py. HDF5 dependency could not be loaded. Trying to get h5py with pip gives exact same error: cant build wheel because hdf5 is missing.
This website does not seem to have anything useful for windows7.
Trying every installer from here had no effect. While claiming that h5py was "successfully installed", trying to install tensorflow proved the opposite.
And trying to install wheels from this website just returned the same error. HDF5 could not be found. Even thought I was trying to install hdf5.
This installation guide is about h5py. it does not work because i dont have hdf5.
So my question is. How do i get a working keras for jupyter? Where can i find an installer that actually installs what i want? What is the complete set of CMD commands that are guaranteed to work and result in a working Tensor flow?
i am using 64 bit windows7, my python is 3.7.2. This fetch quest of collecting tiny bits and pieces of the answer is driving me mad.
Related
I'm trying to install Lazypredict, an autoML python library, on macOS 10.14.6.
Thus, I simply run
"pip install lazypredict" in the terminal , it wants to install lightgbm, but always fails to do so. I think it tries to install lightgbm through pip although I have already installed it with brew (as recommendend).
Hence i get such errors and really don't know what to do. I already have CMake installed too
Do you have ideas of what could enable me to install lazypredict ?
PS: Same happenned with other auto ML packages such as PyCaret
The errors I get are the following:
ERROR: Failed building wheel for lightgbm
Running setup.py clean for lightgbm
Failed to build lightgbm
Installing collected packages: lightgbm
Running setup.py install for lightgbm ... error
ERROR: Command errored out with exit status 1:
Exception: Please install CMake and all required dependencies first
SOLUTION 1 (Recommended)
LazyPredict works with specific versions of other libraries, I recommend you to work with Google Colab or Kaggle Notebook. They create a separate environment having multiple versions of other libraries, when you install lazypredict on colad or kaggle you won't face any issues.
One more reason to use lazypredict on Colab or Kaggle is that this library is just for testing purposes you cannot use this library for deployment, and it won't work on large datasets.
SOLUTION 2
As I mentioned lazypredict depends on specific versions of other libraries, you can search on google and will find a list of those libraries along with their version, try to manually install those versions but it is a time-consuming step, the other way is to install a new python version within which you can create a Virtual Environment and then try to install lazypredict in it.
SOLUTION 3 (only perform if you know docker)
If you are aware of Docker you can install a python image in it, a fresh install that does not contain any libraries, so you can install lazypredict in it.
I am in need of some serious help. It started when I was trying to install pandas using pip in my terminal, when I kept getting a massive error that would say the computer failed to build wheels for numpy.
I then uninstalled numpy to see if possibly a refresh would change this, and now when I try to install numpy I get this error-
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
I have tried using pip, pip3, pip 3.8 and none work for anything. I have a brand new lap top and have python 3.9 and 2.7 installed so I have literally no clue what I could have messed up because I have barely done anything with it.
Please help if you can, I am losing my mind!
p.s. I have the M1 processor if that changes anything
I am trying to call a simple keras.Sequential() model in python 3.9 (64bit), however when trying to install tensorflow using pip I get the following error:
ERROR: Could not find a version that satisfies the requirement tensorflow
ERROR: No matching distribution found for tensorflow
Having stacked this error I followed this fix: TensorFlow not found using pip and tried to use the latest version of CPU only windows wheel using the following command:
install python -m pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.4.0-cp38-cp38-win_amd64.whl
However I then get the following error:
ERROR: tensorflow_cpu-2.4.0-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
The only answer on this that I can find is this:
Tensorflow installation error: not a supported wheel on this platform
However the answer relates to python2.7 and does not apply to this situation.
Is anyone able to help understand why I am finding it so difficult to install tensorflow.
Thanks.
It appears that TensorFlow only supports Python 3.5-3.8, so you are unable to install it because your version of Python is 3.9.
You will need to use a different version of Python if you want to install TensorFlow.
As a premise, I would specify that I am new to Python, so please forgive eventual inaccuracies.
So, I have recently installed Anaconda, and updated the Python version to 3.7.1.
In order to impute some missing values in my dataset using KNN, I've found a useful function in a package called fancyimpute.
However, such package is not among those already available (that is, from Spyder, the IDE I'm using, I cannot simply import it), so I need to install it.
Opening, as such, the Anaconda prompt and typing "conda install fancyimpute" doesn't work, returning the following:
"PackagesNotFoundError: The following packages are not available from current channels:
fancyimpute
Current channels:
(here a list of some channels)
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page".
Going, therefore, with "pip install fancyimpute" (although to me it's still not clear the difference between conda install and pip install) after a while I obtain the following:
"Collecting tensorflow (from fancyimpute)
Could not find a version that satisfies the requirement tensorflow (from fancyimpute) (from versions: )
No matching distribution found for tensorflow (from fancyimpute)"
I have therefore now run "conda install tensorflow", and is already about 30 minutes that is Solving environment.
What can I do? How can I obtain the desired package and avoid similar problems in future? Many thanks and hope I was clear in exposing the problem.
UPDATE: https://anaconda.org/search?q=fancyimpute From here, it seems that fancyimpute isn't available on my platform, w-64. How can I overcome this problem?
SOLVED: Apparently, I have solved the problem.
I have first created an ad hoc environment and installed tensorflow using conda.
Then, I have pip installed fancyimpute: at this point, got a couple of new errors ("Failed building wheel for fastacache", and same for cvxpy), both solved installing Microsoft Visual C++ Build Tools. So, finally, I have been able to install also fancyimpute.
Nonetheless, at this point, I coulnd't import it (ImportError: DLL load failed: The specified module could not be found. Failed to load the native TensorFlow runtime). After uninstalling and reinstalling tensorflow using conda-forge as channel, now it works.
User brittainhard on anaconda.org had the same idea. To use his/her version of the library (hosted on anaconda.org):
conda install -c brittainhard fancyimpute
I'm trying to install python and tensorflow to learn as part of a class I am taking, and am having some issues installing tensorflow. I keep getting the same set of errors:
C:\Users\X\AppData\Local\Programs\Python\Python36-32\python.exe: can't find '__main__' module in 'C:\\'
or
Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow
I've tried uninstalling and reinstalling python while adding it to my path, and that solved me not being stuck with syntax errors (most of the time), but I haven't been able to make any progress. Any advice on moving forward would be appreciated.
To be clear, I am typing the following command into my command prompt:
pip3 install --upgrade tensorflow
As per the instructions on the TensorFlow website - I've been finding the "C:\>" raises a syntax error however.
your pip3 is broken, because I can clearly see tensorflow distribution on PyPi for python 3.6 https://pypi.python.org/pypi/tensorflow/1.5.0. Also, I just created a new virtual env for python 3.6 and I am able to pip install it.
Also you can download manually the "tensorflow-1.5.0-cp36-cp36m-win_amd64.whl",assuming you have windows, and pip install tensorflow-1.5.0-cp36-cp36m-win_amd64.whl