How do I install mlfinlab on Colab? - google-colaboratory

mlfinlab 1.0.1 requires numpy==1.20.1, but tensorflow 2.4.1 requires numpy~=1.19.2.
I have checked the mlfinlab installation for colab. I have uninstalled tensorflow and upgraded my numpy to 1.20.1. However, the following occurs:
Could not find a version that satisfies the requirement mlfinlab (from versions: )
No matching distribution found for mlfinlab
Without Python 3.8, I won't be able to install the library as it only works on that version. I don't know Colab well enough but there must be a way to select a python version. I'm unable to find out how to upgrade Python on Colab. Upgrading will only upgrade the dependencies.
Thanks

MlFinLab now works for Google Colab. We have relaxed the python versions and the dependencies.

Related

tenserflow kernel keeps dying after installing "pydot (version 1.4.1)" and "python-graphviz (version 0.8.4)"

I installed "pydot (version 1.4.1)" and "python-graphviz (version 0.8.4)" to my tensorflow environment in anaconda. Now my tenserflow kernel keeps dying. I did get this warning once when I was trying to import the tensorflow libraries.
C:\Users\lbasnet\Anaconda3\envs\tflow\lib\site-packages\h5py_init_.py:40: UserWarning: h5py is running against HDF5 1.10.5 when it was built against 1.10.4, this may cause problems '{0}.{1}.{2}'.format(*version.hdf5_built_version_tuple)
Any idea how I can resolve this?
I got it resolved by myself. I uninstalled h5py pip uninstall h5py and reinstalled it pip install h5py
If you were trying to get plot_model to work and ended up with the above issue I faced, the following links can be very helpful to get "pydot" and "graphviz" to work.
Link 1 for "pydot"
Link 2 for "pydot"
Link 3 for "graphviz", refer to the answer by Silvia Bakalova if you are a windows user.

Loaded runtime CuDNN library: 8.0.5 but source was compiled with: 8.1.0

I get this error when I run the model.fit_generator code to train images using the CNN model. I don't understand the error, and what should I do? Can anyone help me?
this is the full error description
`Loaded runtime CuDNN library: 8.0.5, but the source was compiled with: 8.1.0. CuDNN library needs to have a matching major version and equal or higher minor version. If using a binary install, upgrade your CuDNN library. If building from sources, ensure the library loaded at runtime is compatible with the version specified during compile configuration.
I had the same error "tensorflow/stream_executor/cuda/cuda_dnn.cc:362] Loaded runtime CuDNN library: 8.0.5 but source was compiled with: 8.1.0."
I solved it by downgrading the TensorFlow version, here it says that you use a new version of TensorFlow that is not compatible with the google colab CuDNN version. I used TensorFlow 2.4.0 plus all the dependence required on version 2.4.0.
Here it says which version of TensorFlow to use for cudnn compatibility, https://www.tensorflow.org/install/source
You should always have version of libraries installed that is matching the version dependency you want to use is compiled with.
You can download the version you need from nvidia website or use conda for package management. It will handle all dependencies for you.
You can miniconda and type conda install -c anaconda tensorflow-gpu to get it sorted for you. If you need a specific version of python, you can create environment with it.
My solution:
After confirming that my cuda and cudnn versions are compatible with tensorflow, I first thought that the system did not synchronize after the installation was completed. After several restarts, it was found that it was not and could not be the problem, so I started to check all the cuda in the system. For the software that depends on cudnn, matlab was uninstalled during the period but it was useless. Later, I thought that pytorch is also related to cuda and cudnn. I checked the version of pytorch and found that I was using torch 1.8, and the cuda it was adapted to was 11.1 , The corresponding cudnn is 8.0.5, now the case is solved. Finally upgraded pytorch and solved it.
I have faced the same issue. It seems like if TensorFlow versions requires specific cuDNN version.
Check the link for required versions.
https://www.tensorflow.org/install/source#gpu
Thanks for This answer.
My solution:
After confirming that my cuda and cudnn versions are compatible with
tensorflow, I first thought that the system ...
It helps me a lot,but I use different way to solve this problem.
I found that pytorch 1.8 is compatible with cudnn 8.1.0. So, instead of upgrade pytorch version, I overwrite the cudnn 8.0.5 dll library with cudnn 8.1.0 in directory D:\Program Files\Python37\Lib\site-packages\torch\lib. You can find this location with Everything, which is always helpful.

TensorFlow2 keeps installing the same version

I'm trying to run a program in my Raspberry but i can't because it needs at least TensorFlow 2.2.0, while I have TensorFlow 2.0.0 . I tried several times to install TensorFlow 2.2.0 and 2.3.0 . But after install it, it always comes that is 2.0.0 still.
Versions of TensorFlow
Somebody can tell me what happens? Thank you!!
Try to find the package in the /python3.x/site-packages and remove the tensorflow directory using rm.
Then install the needed tensorflow version following the installation instruction found here in the official documentation of tensorflow.
Also attaching the image from the comment of #pablo Gracia S.

Tensorflow installation on python 3.4, windows

I'm new to tensorflow and I'm having some problems with the installation. I searched through the official website, without any success. My computer runs on windows, with python version 3.4. None of the sources on the internet seemed to have any command lines for this specific case.
I would greatly appreciate your help:)
I'm pretty sure they added support for python 3.5 only,
But lately they added support for python 3.6 as well.
The only way i can see is that you would have to upgrade, I'm not such a pro with this but that's all i know because i had an import problem with tensorflow which i haven't been able to solve since
You can get the full instructions at Install TF on Windows
I hope you already installed python3 and pip3, if not follow
C:\> pip3 install --upgrade tensorflow

Tensorflow installation

Upon trying to install Tensorflow for conda environment, I encountered with the following error message, without any progress:
tensorflow-1.1.0-cp35-cp35mwin_amd64.whl is not a supported wheel on this platform
Have you tried uninstalling and re-installing TensorFlow using pip within your Conda environment? I.e.:
pip uninstall tensorflow
Followed by:
pip install tensorflow
If it doesn't work, the issue may be with your Python installation. TensorFlow only supports 64-bit Python 3.5+ on Windows (see more info here).
Perhaps you have Python's default installation, which comes in a 32-bit version. If that's the case, you can download the 64-bit Python 3.5 or later from here to run in your Conda environment and then you should be able to install/run TensorFlow without any issues.
Make sure that the Python version installed in the Environment is 3.5 not 3.6. Since 3.6 was released Conda automatically sets that version as default for python 3. However, it is still not supported by Tensorflow.
You can work using tensorflow library along with other essential libraries using the Dockerfile. Using Docker for environment are a good way to run experiments in reproducible manner as in this blog
You can also try using datmo in order setup environment and track machine learning projects for making it reproducible using datmo CLI tool.