Python Forum

Full Version: How to run utilities from a Python package?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have installed Python 3.9 in a VENV so that I can use the PyQT6 library (my understanding is that PyQT6 cannot be used with Python 3.12, so I used a VENV). I guess this would apply to a regular install of Python as well. The executables for the QT Designer are in a file path that is not in my PATH variable, so when I call it from anywhere but the location of the file, it is not found.

Is it regular/smart practice to put the filepath to utilities like that in my PATH variable (either the system one or the one in the 'activate.bat' file for the VENV)?

I am very new to Python and am not sure about that.

Thanks in advance for the assistance!
--Jim
venv creates a python virtual environment, which by default isolates your project site packages from system level site packages
it has it's own copy of the python interpreter thus allowing different projects to use different versions of python.

Read PEP405
and also: Creation of virtual environments

Having a virtual environment for each project is a good thing.
I almost never start a project without first creating (and activating) a virtual environment.