I have an C++ app for Windows. It runs python script to calculate something. There is problem on user side because some libraries don`t want to be installed by pip with latest python and script does not work.
I heve decided to take embeddable version of python 3.9, install all dependancies and place it into strong defined path (at least, later it can be folder in the C++ application instalation dir). So I heve downloaded embaddable python package from official page, then I've installed pip using get-pip.py and then I've installed packages by pip using --prefix option.
python -m pip install --prefix=path\to\emb\python package1 package2 ...
After instalaton a folder Lib has been added to dir of embeddable python. This folder contains all libs that I`ve asked to install.
The problem is: if user has python installed on his machine, the my embeddable python tries to search libs in user space (C:\Users\UserName\AppData\Roaming\Python). I have tried to rewrite the PATH enviromental variable and set the PYTHONPATH="path\to\emb\python" in command line session, to avoid user space searching, but python still find libs in user space, not in PYTHONPATH dirs.
Could you give me an advice how to disallow Python to search libs in user space?