Skip to content

Commit

Permalink
Fix #2275 -- use sys.executable for calling pip
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwpolska committed Mar 2, 2016
1 parent 4f93ccd commit d690ebb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nikola/plugins/command/plugin.py
Expand Up @@ -29,6 +29,7 @@
from __future__ import print_function
import io
import os
import sys
import shutil
import subprocess
import time
Expand Down Expand Up @@ -254,7 +255,7 @@ def do_install(self, url, name, show_install_notes=True):
LOGGER.notice('This plugin has Python dependencies.')
LOGGER.info('Installing dependencies with pip...')
try:
subprocess.check_call(('pip', 'install', '-r', reqpath))
subprocess.check_call((sys.executable, '-m', 'pip', 'install', '-r', reqpath))
except subprocess.CalledProcessError:
LOGGER.error('Could not install the dependencies.')
print('Contents of the requirements.txt file:\n')
Expand Down

0 comments on commit d690ebb

Please sign in to comment.