OpenGL and Python Setup in Ubuntu

For OpenGL:

Step1: Update the latest package using below command.

sudo apt-get update

Step2: Install freeglut3 library using below command.

  sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev

Step3: Install gedit using below command.

sudo apt install gedit

Step4: Install g++ if it is not installed using below command.

sudo apt-get install g++

Most used command for OpenGL:

1. To open gedit by using below command:

    gedit

    2. To compile the program by using below command:

    g++ programe_name.cpp -lGL -lGLU -lglut -o output_name

    3. To run the program by using below command:

    ./output_name

    4. To create or open program file in gedit by using below command:

    gedit filename.cpp

    For Python:

    Step1: Update the latest package using below command.

    sudo apt-get update

    Step2: To Install opencv python library using below command.

    sudo apt install libopencv-dev python3-opencv

    Step3: To verify the python successfully installed or not by using below command.

    python -c "import cv2; print(cv2.__version__)"

    Most used command for Python:

    1. To open or create the python file in gedit by using below command.

    gedit filename.py

    2. To compile and run the program by using below command.

    python3 filename.py

    Leave a Reply

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