Pycharm Professional Tutorial



In this tutorial, you operate in Scientific Mode and use Matplotlib and NumPy packages to run and debug a Python code with data visualization. Before you start, ensure the following is installed: Conda interpreter. Matplotlib package. Creating a Scientific project Create a PyCharm project with the scientific settings predefined. PyCharm Software Application Tutorial PyCharm is an IDE (Integrated Development Environment) where you can write programs and make use of a variety of Python tools. PyCharm is an Integrated Development Environment (IDE) that provides tools for writing efficient code. It supports various frameworks such as Django, Flask, and Pyramid. PyCharm is majorly used by developers for application development with Python language. PyCharm comes in three editions: PyCharm Edu is free and for educational purposes.; PyCharm Community is free as well and intended for pure Python development.; PyCharm Professional is paid, has everything the Community edition has and also is very well suited for Web and Scientific development with support for such frameworks as Django and Flask, Database and SQL, and scientific tools. Installing PyCharm. For developing applications in Python using PyCharm, you need to install it in your system. PyCharm is available in two versions: Professional version: It is a full-featured IDE used by professional developers. Community version: It is an open-source and free software that is not full-featured. You can use it for learning.

PyQt5 is a toolkit for creating Python GUI applications. As a cross-platform toolkit, PyQt can run on all major operating systems (Unix, Windows (Mac).

This article describes how to install Python + PyCharm + PyQt5.

Tutorial

With PyQt5, the GUI is designed in two ways:

  • directly using the code to design the interface
  • using QtDesigner to visualize the design, and then convert the resulting .ui file into a .py file.

Pycharm Pro Tutorial

Related course: Create Desktop Apps with Python PyQt5

Install Python + PyCharm + PyQt5.

Step 1. Install Python.

Visit the official website at https://www.python.org/ to download and install your target Python version.

Install PyQt5

Enter the cmd interface. Run the command and wait a moment.

The command is executed and PyQt5 is installed.

Test if pqyt5 is actually installed

Create a new file, example.py, and enter the following code.

After running, the following screen will pop up, indicating that PyQt is working normally.

Professional

3. Install PyCharm.

Visit the official website http://www.jetbrains.com/pycharm/
Choose download and install Community version.

PyCharm Basic Configuration.

Step 1 Create a new project

Step 2 Set the default PyCharm parser.

Select File | Settings | Project: first | Project Interpreter, set Project Interpreter to The version of python you are using

Step 3 Adding third-party libraries

Stay in the Project Interpreter interface, click on the +, find and install pyqt5. pyqt5-sip, pyqt5-tools. After successful installation, the interface should look like this.

Step 4 Configuring QtDesigner

Install designer
You can start designer directly from PyCharm. Make sure designer is installed first. Designer is not installed with the pip installation.

On Fedora Linux you can do this:

Ubuntu Linux users can do thiS:

Pycharm Tutorial Ppt

You can also do this:

Once qt5-designer is installed, you can configure it in PyCharm.

PyCharm select File | Settings | Tools | PyCharm. External Tools, click + New Tools, Create QTdesigner and PyUIC tools

Configure two key parameters.

  • Program: the path to your own designer.

    • Windows users can link to designer.exe, for example C:xxxxAppDataLocalProgramsPythonPython35-32Libsite-packagespyqt5-toolsdesigner.exe

    • Fedora Linux users can link designer-qt5

    • Ubuntu users can set it to /usr/lib/x86_64-linux-gnu/qt5/bin/designer

  • Working directory: $ProjectFileDir$

Step 5: Configure PyUIC

Configure three key parameters.

  • Program: Your own python.exe path For example, C:xxxxAppDataLocalProgramsPythonPython35-32python.
  • Arguments:-m PyQt5.uic.pyuic $FileName$ -o $FileNameWithoutExtension$.py

Pycharm Professional Tutorial

  • Working directory:$ProjectFileDir$

You may like: Create Desktop Apps with Python PyQt5 Minecraft mac download free cracked.

Test PyQt installation

From code

Now that everything is setup, it’s time to test if everything is setup correctly.
Create a GUI interface using the code below (or any PyQt code).

Select Run->Run first. You should see a PyQt window popup.

QTDesigner

Use QTDesigner to generate a GUI interface and convert it to a .py file using PyUIC.

Select Tools->ExternalTools->QTdesigner.

In the QT Designer interface, a GUI creation interface will pop up for the first time, click on create to automatically generate a GUI interface.

Pycharm basic tutorial

Save the interface as Untitled.ui file.

Back to the PyCharm project interface, there is an extra .ui file under the project list.

Right-click on Untitled.ui and select ExternalTools->PyUIC in the pop-up list.

Pycharm Professional Tutorial

This will generate a Untitled.py file for Untitled.ui.