Package not found using os.system()

I installed “tabulate” through requirements.txt and I check that by:

import streamlit as st
import pkg_resources

installed_packages = pkg_resources.working_set

for package in installed_packages:
    st.write(package.key, package.version)
## tabulate 0.9.0 was found.

But when in my running

python_path    =["which", "python"], stdout=subprocess.PIPE, text=True).stdout.strip()
os.system(python_path   + "")

something wrong:

ModuleNotFoundError: No module named 'tabulate'


from tabulate import tabulate


You are probably using different python environments.

thanks !!!
python_path = sys.executable
solve the problem !!!