class LearnOpen::DependencyInstallers::PipInstaller

Public Class Methods

detect(lesson, location) click to toggle source
# File lib/learn_open/services/dependency_installers/pip_installer.rb, line 4
def self.detect(lesson, location)
  File.exists?("#{lesson.to_path}/requirements.txt")
end

Public Instance Methods

run() click to toggle source
# File lib/learn_open/services/dependency_installers/pip_installer.rb, line 8
def run
  io.puts "Installing pip dependencies..."
  system_adapter.run_command("python -m pip install -r requirements.txt")
end