Python script - get installed packages in other virtualenv

129 Views Asked by At

I'm creating a virtual environment during runtime using virtualenv.create_environment. If this env was already created I skip the installation, but would like to check and see if a certain package is installed. Right now I'm running a command activating the env and pip list.

My question is if I can to import the pip from the virtual env and pip.get_installed_distributions()?

0

There are 0 best solutions below