×
1 Choose EITC/EITCA Certificates
2 Learn and take online exams
3 Get your IT skills certified

Confirm your IT skills and competencies under the European IT Certification framework from anywhere in the world fully online.

EITCA Academy

Digital skills attestation standard by the European IT Certification Institute aiming to support Digital Society development

LOG IN TO YOUR ACCOUNT

CREATE AN ACCOUNT FORGOT YOUR PASSWORD?

FORGOT YOUR PASSWORD?

AAH, WAIT, I REMEMBER NOW!

CREATE AN ACCOUNT

ALREADY HAVE AN ACCOUNT?
EUROPEAN INFORMATION TECHNOLOGIES CERTIFICATION ACADEMY - ATTESTING YOUR PROFESSIONAL DIGITAL SKILLS
  • SIGN UP
  • LOGIN
  • INFO

EITCA Academy

EITCA Academy

The European Information Technologies Certification Institute - EITCI ASBL

Certification Provider

EITCI Institute ASBL

Brussels, European Union

Governing European IT Certification (EITC) framework in support of the IT professionalism and Digital Society

  • CERTIFICATES
    • EITCA ACADEMIES
      • EITCA ACADEMIES CATALOGUE<
      • EITCA/CG COMPUTER GRAPHICS
      • EITCA/IS INFORMATION SECURITY
      • EITCA/BI BUSINESS INFORMATION
      • EITCA/KC KEY COMPETENCIES
      • EITCA/EG E-GOVERNMENT
      • EITCA/WD WEB DEVELOPMENT
      • EITCA/AI ARTIFICIAL INTELLIGENCE
    • EITC CERTIFICATES
      • EITC CERTIFICATES CATALOGUE<
      • COMPUTER GRAPHICS CERTIFICATES
      • WEB DESIGN CERTIFICATES
      • 3D DESIGN CERTIFICATES
      • OFFICE IT CERTIFICATES
      • BITCOIN BLOCKCHAIN CERTIFICATE
      • WORDPRESS CERTIFICATE
      • CLOUD PLATFORM CERTIFICATENEW
    • EITC CERTIFICATES
      • INTERNET CERTIFICATES
      • CRYPTOGRAPHY CERTIFICATES
      • BUSINESS IT CERTIFICATES
      • TELEWORK CERTIFICATES
      • PROGRAMMING CERTIFICATES
      • DIGITAL PORTRAIT CERTIFICATE
      • WEB DEVELOPMENT CERTIFICATES
      • DEEP LEARNING CERTIFICATESNEW
    • CERTIFICATES FOR
      • EU PUBLIC ADMINISTRATION
      • TEACHERS AND EDUCATORS
      • IT SECURITY PROFESSIONALS
      • GRAPHICS DESIGNERS & ARTISTS
      • BUSINESSMEN AND MANAGERS
      • BLOCKCHAIN DEVELOPERS
      • WEB DEVELOPERS
      • CLOUD AI EXPERTSNEW
  • FEATURED
  • SUBSIDY
  • HOW IT WORKS
  •   IT ID
  • ABOUT
  • CONTACT
  • MY ORDER
    Your current order is empty.
EITCIINSTITUTE
CERTIFIED

How to install TensorFlow?

by JFG / Saturday, 09 December 2023 / Published in Artificial Intelligence, EITC/AI/GCML Google Cloud Machine Learning, First steps in Machine Learning, Plain and simple estimators

TensorFlow is a popular open-source library for machine learning. To install it you first need to install Python.

Please be advised that the exemplary Python and TensorFlow instructions serve only as an abstract reference to plain and simple estimators. Detailed instructions on using TensorFlow 2.x version will follow in subsequent materials.

If you would like to install the most recent version of Python with TensorFlow and scikit-learn to do some hands-on, please follow the instructions contained below, that are also additionally present in the updates list under the Plain and simple estimators topic of the EITC/AI/GCML Google Cloud Machine Learning available at https://eitca.org/programmes/eitc-ai-gcml-google-cloud-machine-learning/lessons/first-steps-in-machine-learning/topic/plain-and-simple-estimators/.

Please note however that you don’t have to delve in Python and TensorFlow in the EITC/AI/GCML certification programme, as it is not required, but if you’d like to, you are welcome. Please be advised that Python programming is fully covered in the EITC/CP/PPF Python Programming Fundamentals certification programme, available at https://eitca.org/programmes/eitc-cp-ppf-python-programming-fundamentals/.

Python is not required in the EITC/AI/GCML Google Cloud Machine Learning certification programme.

1. Install Python
Download Python
Visit the official Python website’s download section, Python Downloads at https://www.python.org/downloads/
Download the latest version for Windows (or for MacOS, or Linux depending on your system)

Install Python
Run the installer
Ensure “Add Python to PATH” is checked at the bottom
Click “Install Now”

2. Install Visual Studio Code
Download the VS Code
Visit the official VS Code website, Visual Studio Code at https://code.visualstudio.com/
Download the Windows version (or MacOS, or Linux version depending on your system)

Install VS Code
Run the installer and follow the installation prompts
Install Python Extension for VS Code

Open VS Code
Go to Extensions (you can use the shortcut Ctrl+Shift+X)
Search for “Python” and install the official Python extension provided by Microsoft

3. Install TensorFlow and scikit-learn
Open Command Prompt
In Windows system press Windows + R, type cmd, and press Enter
Install TensorFlow
Type pip install tensorflow and press Enter
Install scikit-learn:
Type pip install scikit-learn and press Enter

4. Set Up VS Code for Python Development
Open VS Code
Create a New Python File
Go to File > New File
Save it with a .py extension, for example, test.py

Select Python Interpreter
Press Ctrl+Shift+P to open the command palette
Type “Python: Select Interpreter” and select it
Choose the Python version you installed earlier

Write and Run Python Code
In test.py, write a simple Python code, e.g., print(“Hello, TensorFlow!”)
Right-click and select “Run Python File in Terminal” to execute the code

Test TensorFlow and scikit-learn
In the same test.py, add the following:

        python
        import tensorflow as tf
        import sklearn
        print(tf.__version__)
        print(sklearn.__version__)
        

Run the file again as before to see the versions of TensorFlow and scikit-learn printed in the terminal

5. Explore and Code:

With everything set up, you can now use VS Code to develop Python applications, utilizing TensorFlow and scikit-learn. VS Code offers features like IntelliSense, debugging, and more, which will enhance your development experience
Remember to keep your packages updated regularly using pip to ensure you have the latest features and security patches

If you’re experincing problems in installing TensorFlow, you can follow these more detailed step-by-step instructions:

1. Choose the appropriate installation method: TensorFlow can be installed on various platforms, including Windows, macOS, and Linux. Before proceeding, ensure that your system meets the minimum requirements for TensorFlow installation.

2. Create a virtual environment (optional): It is recommended to create a virtual environment to isolate your TensorFlow installation from other Python packages. This step ensures that TensorFlow and its dependencies are installed in a separate environment, preventing conflicts with other packages. You can use tools like virtualenv or conda to create a virtual environment.

3. Install TensorFlow: Once you have set up your virtual environment (if desired), you can proceed with installing TensorFlow. There are multiple ways to install TensorFlow, depending on your system and requirements:

a. Installing with pip: The easiest way to install TensorFlow is by using pip, the Python package installer. Open a command prompt or terminal and run the following command:

      pip install tensorflow
      

This will download and install the latest stable version of TensorFlow. If you want to install a specific version, you can specify it by adding the version number after the package name, like `tensorflow==2.3.0`.

b. Installing with Anaconda: If you are using the Anaconda distribution, you can install TensorFlow using conda, which is Anaconda's package manager. Open a command prompt or terminal and run the following command:

      conda install tensorflow
      

This will download and install the latest version of TensorFlow available in the Anaconda repository.

c. Installing from source: If you prefer to build TensorFlow from source, you can follow the instructions provided in the TensorFlow documentation. Building from source gives you more control over the installation process and allows you to customize TensorFlow based on your specific needs.

4. Verify the installation: After the installation is complete, it is essential to verify that TensorFlow is working correctly. You can do this by importing TensorFlow in a Python script or interactive Python environment and checking for any error messages. Here's an example:

python
   import tensorflow as tf
   
   # Check TensorFlow version
   print("TensorFlow version:", tf.__version__)
   
   # Create a simple TensorFlow computation
   a = tf.constant(2)
   b = tf.constant(3)
   c = tf.add(a, b)
   
   # Run the computation and print the result
   with tf.Session() as sess:
       result = sess.run(c)
       print("Result:", result)
   

Running this script should output the TensorFlow version and the result of the computation, which in this case is 5.

Please note that if you are using TensorFlow 2.x and wish to run the above code, you might need to enable compatibility mode in TensorFlow 2.x by adding over the previously indicated code the following:

python
   import tensorflow.compat.v1 as tf
   tf.disable_v2_behavior()

This will allow to run TensorFlow 1.x code in a TensorFlow 2.x environment.

Alternatively you can stick with TensorFlow 2.x eager execution, which is more intuitive and easier to use than the session-based execution of TensorFlow 1.x. In that case the code could be modified as follows:

python
   import tensorflow as tf
   # Check TensorFlow version
   print("TensorFlow version:", tf.__version__)

   # Create a simple TensorFlow computation
   a = tf.constant(2)
   b = tf.constant(3)
   c = tf.add(a, b)

   # Print the result
   print("Result:", c.numpy())

Congratulations! You have successfully installed TensorFlow and verified its functionality. You can now start exploring the vast capabilities of TensorFlow for machine learning and deep learning tasks.

Other recent questions and answers regarding Plain and simple estimators:

  • Do I need to install TensorFlow?
  • I have Python 3.14. Do I need to downgrade to version 3.10?
  • Are the methods of Plain and Simple Estimators outdated and obsolete or they still have value in ML?
  • How do Keras and TensorFlow work together with Pandas and NumPy?
  • Right now, should I use Estimators since TensorFlow 2 is more effective and easy to use?
  • What is artificial intelligence and what is it currently used for in everyday life?
  • How to use Google environment for machine learning and applying AI models for free?
  • How Keras models replace TensorFlow estimators?
  • How to use TensorFlow Serving?
  • What is the simplest route to most basic didactic AI model training and deployment on Google AI Platform using a free tier/trial using a GUI console in a step-by-step manner for an absolute begginer with no programming background?

View more questions and answers in Plain and simple estimators

More questions and answers:

  • Field: Artificial Intelligence
  • Programme: EITC/AI/GCML Google Cloud Machine Learning (go to the certification programme)
  • Lesson: First steps in Machine Learning (go to related lesson)
  • Topic: Plain and simple estimators (go to related topic)
Tagged under: Anaconda, Artificial Intelligence, Installation, Machine Learning, Pip, TensorFlow
Home » Artificial Intelligence » EITC/AI/GCML Google Cloud Machine Learning » First steps in Machine Learning » Plain and simple estimators » » How to install TensorFlow?

Certification Center

USER MENU

  • My Account

CERTIFICATE CATEGORY

  • EITC Certification (105)
  • EITCA Certification (9)

What are you looking for?

  • Introduction
  • How it works?
  • EITCA Academies
  • EITCI DSJC Subsidy
  • Full EITC catalogue
  • Your order
  • Featured
  •   IT ID
  • EITCA reviews (Medium publ.)
  • About
  • Contact

EITCA Academy is a part of the European IT Certification framework

The European IT Certification framework has been established in 2008 as a Europe based and vendor independent standard in widely accessible online certification of digital skills and competencies in many areas of professional digital specializations. The EITC framework is governed by the European IT Certification Institute (EITCI), a non-profit certification authority supporting information society growth and bridging the digital skills gap in the EU.
Eligibility for EITCA Academy 90% EITCI DSJC Subsidy support
90% of EITCA Academy fees subsidized in enrolment

    EITCA Academy Secretary Office

    European IT Certification Institute ASBL
    Brussels, Belgium, European Union

    EITC / EITCA Certification Framework Operator
    Governing European IT Certification Standard
    Access contact form or call +32 25887351

    Follow EITCI on X
    Visit EITCA Academy on Facebook
    Engage with EITCA Academy on LinkedIn
    Check out EITCI and EITCA videos on YouTube

    Funded by the European Union

    Funded by the European Regional Development Fund (ERDF) and the European Social Fund (ESF) in series of projects since 2007, currently governed by the European IT Certification Institute (EITCI) since 2008

    Information Security Policy | DSRRM and GDPR Policy | Data Protection Policy | Record of Processing Activities | HSE Policy | Anti-Corruption Policy | Modern Slavery Policy

    Automatically translate to your language

    Terms and Conditions | Privacy Policy
    EITCA Academy
    • EITCA Academy on social media
    EITCA Academy


    © 2008-2026  European IT Certification Institute
    Brussels, Belgium, European Union

    TOP
    CHAT WITH SUPPORT
    Do you have any questions?
    We will reply here and by email. Your conversation is tracked with a support token.