-
Open your command prompt or terminal.
-
Navigate to your project directory (if you haven't already) where you want to create the virtual environment.
-
Run the following command to create a virtual environment.
python -m venv "Virtual_Environment_Name"
-
Replace "Virtual_Environment_Name" with your desired name.
-
Navigate to the virtual environment's "Scripts" directory.
-
Run the following command to activate a virtual environment.
-cd "Virtual_Environment_Name"\Scripts
-activate (for cmd)
-Activate.ps1 (for powershell)
-
Replace "Virtual_Environment_Name" with your created virtural environment.
-
Run the following command to install PyQt5:
-pip install pyqt5
-
Additionally, you can install PyQt5 tools for working with Qt Designer:
-pip install pyqt5-tools
-
Activate the virtural Environment if created.
-
Navigate to the "PyQt Application" Directory
-
Run the following code in terminal to run Python code
-python main.py