[Dependencies] Avoid trying to remove older python versions
- Older packages could be installed at system level, so we will fail. Also: we don't want to remove what the user has, just have a better version.
This commit is contained in:
parent
aba02e083c
commit
d5c398e04e
|
|
@ -241,8 +241,10 @@ def pip_install(pip_command, dest=None, name='.'):
|
|||
cmd = [pip_command, 'install', '-U', '--no-warn-script-location']
|
||||
if name == '.':
|
||||
# Applied only when installing a downloaded tarball
|
||||
# This is what -U (--user) means, but Debian's pip installs to /usr/local when used by root
|
||||
cmd.extend(['--root', os.path.dirname(site.USER_BASE), '--prefix', os.path.basename(site.USER_BASE)])
|
||||
# This is what --user means, but Debian's pip installs to /usr/local when used by root
|
||||
cmd.extend(['--root', os.path.dirname(site.USER_BASE), '--prefix', os.path.basename(site.USER_BASE),
|
||||
# If we have an older version installed don't remove it
|
||||
'--ignore-installed'])
|
||||
cmd.append(name)
|
||||
logger.debug('- Running: {}'.format(cmd))
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in New Issue