To update your project's dependencies using Poetry, you can use the following command in your terminal or command prompt where your project is located:
pip install poetry
poetry update
To compile a Python script into a standalone executable using PyInstaller along with Poetry, follow these steps:
-
Ensure PyInstaller is included in your project's dependencies. You can add it by running:
poetry add pyinstaller
-
Compile your
main.py
script into an executable. Use the following command:poetry run pyinstaller --onefile --windowed main.py
--onefile
: Creates a single executable file.--windowed
: Prevents a command-line window from appearing when the application is run (useful for GUI applications).
-
After running the command, your executable will be located in the
dist
folder within your project directory.