Close Navigation
Learn more about IBKR accounts
How to Setup in Python TensorFlow 2.1+ for Deep Learning

How to Setup in Python TensorFlow 2.1+ for Deep Learning

Posted September 18, 2023
Dr. Pawel Lachowicz
Quant at Risk

The article “How to Setup in Python TensorFlow 2.1+ for Deep Learning” first appeared on Quant at Risk blog.

Excerpt

If you wonder how to start with Deep Learning – this post is for you. Using MacOS as an exemplary working operating system, I will help you to set up and adjust your current Python-based world to be ready for commencing your first DL project. Are you ready? Good! Here we go!

1. Download and Install Python 3.7+ within Anaconda Distribution

No matter are you new to Python programming or quite advanced in coding, Anaconda Inc. (previously known as Continuum Analytics) grew to a current position as a market leader and standard-provider when it comes to downloading and setting up a rich Python-based environment on your PC, Mac, or Linux. Simply speaking, if you want to work efficiently in Python then the use of the Anaconda Distribution for the most recent version of Python is the starting pack you are looking for! Simply visit this webpage, choose the operating system for which you intend to download your Anaconda Distribution, for instance:

and (preferably) select the Graphical Installer of Python 3.7. First, it will start downloading the installation file, and next, when run, you will be guided through a few simple steps making the entire installation of the Anaconda Distribution on your local machine complete.

Once the installation process is done (here: ver 2019.10), you might inspect the local .bash_profile file located in your home directory (MacOS/Linux). The process adds a few lines, easy to spot:

This initialises the environment every time you open a new Terminal window. From the moment, accessing Python directly is as simple as typing:

Usually when you install the Anaconda Distribution (on some random day since its official release date), keep in mind that some packages and libraries which come along as default ones might require a refreshment. Start with

conda update conda

Next, update all default libraries with

conda update --all

In that process you can notice which versions were originally built-in and to which version they will be upgraded:

Anaconda Distribution provides you with a number of excellent libraries you can consider as fundamental ones. Make sure your “batteries included” contain:

numpy              # numerical computations

scipy              # additional numerical tools

pandas             # data processing

matplotlib         # plotting

seaborn            # fancy plotting

statsmodels        # statistical modeling

sympy              # symbolical computations

scikit-learn       # machine-learning

and keep them updated on a regular basis using conda update –all command.

Regarding the above list of libraries, the last one there, the scikit-learn, is the mecca for all Machine Learning practitioners. If you wish to start your experience with ML algorithms, you will step into a wonderful world of AI simply by studying provided there elegant documentation and tonnes of valuable examples:

Visit Quant at Risk blog for the next step in this tutorial – how to install Keras and TensorFlow 2.1+

Join The Conversation

If you have a general question, it may already be covered in our FAQs. If you have an account-specific question or concern, please reach out to Client Services.

Leave a Reply

Your email address will not be published. Required fields are marked *

Disclosure: Interactive Brokers

Information posted on IBKR Campus that is provided by third-parties does NOT constitute a recommendation that you should contract for the services of that third party. Third-party participants who contribute to IBKR Campus are independent of Interactive Brokers and Interactive Brokers does not make any representations or warranties concerning the services offered, their past or future performance, or the accuracy of the information provided by the third party. Past performance is no guarantee of future results.

This material is from Quant at Risk and is being posted with its permission. The views expressed in this material are solely those of the author and/or Quant at Risk and Interactive Brokers is not endorsing or recommending any investment or trading discussed in the material. This material is not and should not be construed as an offer to buy or sell any security. It should not be construed as research or investment advice or a recommendation to buy, sell or hold any security or commodity. This material does not and is not intended to take into account the particular financial conditions, investment objectives or requirements of individual customers. Before acting on this material, you should consider whether it is suitable for your particular circumstances and, as necessary, seek professional advice.

IBKR Campus Newsletters

This website uses cookies to collect usage information in order to offer a better browsing experience. By browsing this site or by clicking on the "ACCEPT COOKIES" button you accept our Cookie Policy.