I am working on an application which uses Boost.Python to embed the Python interpreter. This is used to run user-generated \"scripts\" which interact with the main program.<
This post elaborates on @Micheal Cooper and @frmdstryr.
Once you identified the problematic PATH entries, you can put the following in front of a
python script, assuming here that iCLS Client and CMake are problematic.
import os
for forbidden_substring in ['iCLS Client', 'CMake']:
os.environ['PATH'] = ';'.join([item for item in os.environ['PATH'].split(';')
if not item.lower().find(forbidden_substring.lower()) >= 0])
Concerning the vim with YouCompleteMe case, you can put the following at the top of your vimrc:
python << EOF
import os
for forbidden_substring in ['iCLS Client', 'CMake']:
os.environ['PATH'] = ';'.join([item for item in os.environ['PATH'].split(';')
if not item.lower().find(forbidden_substring.lower()) >= 0])
EOF
If none of these solutions is applicable for you, you can try to remove the problem causing entries from you PATH manually, but you want to make sure you don't break anything else on your system that depends on these PATH entries. So, for instance, for CMake you could try to remove its PATH entry, and only put a symlink (or the like) pointing to the cmake.exe binary into some other directory that is in your PATH, to make sure cmake is still runnable from anywhere.