2017-09-23 Standalone distribution of Python¶
It is usually impossible to manually copy a Python distribution
somewhere else after it was installed. The scripts such as pip.exe
contains the absolute location of the interpreter. That’s why, if you
insist to do so on Windows (like I do), you need to replace
every path by a relative one or a blank one. That’s what the
following script is doing.
from pymyinstall.win_installer import win_patch_paths
win_patch_paths(r"C:\temp\Python36-3.6.2-amd64\Scripts", fLOG=print)
The function win_patch_paths
looks for all paths following a given pattern and replace them by an empty string
or a custom one.