Beispiel #1
0
 def init_venv(self):
     if self.have_venv():
         return
     self.log.write('initializing python virtual environment {}'.format(self.get_name()))
     try:
         if is_windows():
             run(['virtualenv', os.path.join(get_root_dir(), self.get_name())])
         else:
             run(['virtualenv', '--python=python3.5', os.path.join(get_root_dir(), self.get_name())])
     except Exception as e:
         self.log.exit_nicely('python virtual environment creation error', e)
Beispiel #2
0
def install_opencv():
    ocv_cacher = OpencvCatcher(get_third_party_dir(), os.path.join(get_root_dir(), 'venv'))
    ocv_cacher.install()