On Thu, Apr 6, 2017 at 12:12 AM, MRAB <pyt...@mrabarnett.plus.com> wrote: >>>> import os >>>> [p for p in os.environ['PATH'].split(';') if 'Python35' in p] > > Remove those references from the PATH environment variable: > >>>> os.environ['PATH'] = ';'.join(p for p in os.environ['PATH'].split(';') >>>> if 'Python35' not in p) > > Job done!
Changing an environment variable in a process applies only to the process and its descendants. It doesn't change the persistent value that, on Windows, is stored in the registry. It's best to use the GUI shell's environment-variable editor for this, for multiple reasons. -- https://mail.python.org/mailman/listinfo/python-list