How to buid and install Keras from the source

I want to build Keras from source code. I have downloaded the python source from Github with Git and I used this command in order to build Keras: “python setup.cfg build”. I didn’t update the original file setup.cfg". I got this error:

Thank you

To all the new ones here, I’d like to take a moment to explain what “building from source” exactly means.
“Compile the source code into an installable package and link all modules to their respective endpoints.

Note that even after this migration, Keras is still accessed by calling from tensorflow import keras. This is enabled by something known as golden APIs. These are endpoints exposed by the Keras library for the TensorFlow library to pick up. Therefore, even though Keras is developed separately, for the user it still resides at tf.keras.

I assume you are doing this on a Linux machine. Bonus point, this works flawlessly with TPU-enabled Cloud VMs.

All of the following commands were taken directly or inspired by the official Keras contributing guide. Please go through the same before opening a PR.

I’ve also created a Colab notebook which you can use to build and test the code easily!

You can directly get help from this (removed by moderator) if your will become stuck in trouble.

This is how I used to do it back in the day:

  1. Create environment and git clone.
  2. pip install tf-nightly
  3. bazel build //keras/tools/pip_package:build_pip_package
  4. bash keras/tools/pip_package/ --dst .

The above should create a Keras .whl file. From here you can simply:
pip install --force-reinstall keras-2.11.0-py2.py3-none-any.whl

Make sure you exit the repo before running imports or you will get weird errors.

Thank you,
I am using Windows 10
when I wanted to create the package with this command:
bazel-bin\keras\tools\pip_package\build_pip_package C:/tmp/keras_pkg
I got this error:
cp: cannot stat ‘bazel-bin/keras/tools/pip_package/build_pip_package.runfiles/org_keras/keras’: No such file or directory