How to Check Your TensorFlow Version in Colab?

To check your TensorFlow version in your Jupyter Notebook such as Google’s Colab, use the following two commands: import tensorflow as tf This imports the TensorFlow library and stores it in the variable named tf. print(tf.__version__) This prints the installed TensorFlow version number in the format x.y.z. The following code example uses the dunder attribute … Read more

How to Check the Pandas Version in Your Script?

What is the Pandas Library? The pandas library provides data structures and functionality to represent and manipulate labelled and tabular data. Think of it as like an advanced spreadsheet program in your code with functionality includingโ€”but not limited to: creating spreadsheets, accessing individual rows by name, calculating basic statistics over rows and columns, and summing … Read more

How to Install a Python Package with a .whl File?

Problem Formulation: Given a file yourPackage.whl that resides in the folder C:\your\folder\. How to install it on your Windows machine? Background .whl Files A .whl file (read: wheel file) is a zip archive that contains all the files necessary to run a Python application. What is a wheel? It’s a built-package format for Python, i.e., … Read more

How to Install a Library on PyCharm?

Problem Formulation: Given a PyCharm project. How to install a library in your project within a virtual environment or globally? Solution that (almost) always works: Here’s the installation process as a short animated video: How to Install a Library on PyCharm? In some PyCharm versions, the installation steps will be slightly different. If this is … Read more

How to Install Pandas on PyCharm?

Problem Formulation: Given a PyCharm project. How to install the pandas library in your project within a virtual environment or globally? Solution that always works: Open File > Settings > Project from the PyCharm menu. Select your current project. Click the Python Interpreter tab within your project tab. Click the small + symbol to add … Read more

How to Import Libraries in Python’s exec() Function?

What is the exec() Function exec() is a built-in Python function that is most commonly used to dynamically execute code,  either as a string or object code. To properly understand how we can use exec() to import libraries and modules we need to familiarize ourselves with the syntax of the function itself, as it becomes relevant later: … Read more

How to Get Started With Python Dash on PyCharm [Absolute Beginners]

This is a chapter draft of our book Python Dash with NoStarch: Why an IDE Using an integrated development environment (IDE) has the potential to significantly accelerate your programming productivity. Many programmers do not unlock their full potential until they finally decide to switch from a simple code editor to an IDEโ€”and mastering the advanced … Read more

PIP Install PIL/Pillow – A Helpful Illustrated Guide

PIL is an abbreviation of Python Imaging Library and it adds image processing to Python. In 2011, PIL has been discontinued—its unofficial successor framework Pillow for image processing is an actively maintained and user-friendly alternative in Python 3. Alternatively, you may use any of the following commands to install pillow, depending on your concrete environment. … Read more