def install(parsed, unknown): env.validate() if platform.system() == 'Darwin': install_darwin() elif platform.system() == 'Linux': install_linux() elif platform.system() == 'Windows': print(ansi.warning() + ' pyenv does not ' 'support Windows. Creating virtual env with installed python.') else: raise KeyError('unknown system: ' % platform.system()) install_python_version() create_virtual_env() install_requirements(parsed) if hasattr(parsed, 'native') and parsed.native: install_tensorflow()
def install(parsed, unknown): env.validate() if platform.system() == 'Darwin': install_darwin() elif platform.system() == 'Linux': install_linux() elif platform.system() == 'Windows': print(ansi.warning() + ' pyenv does not ' 'support Windows. You\'ll have the task of managing' ' python versions yourself 😰') return else: raise KeyError('unknown system: ' % platform.system()) install_python_version() create_virtual_env() install_requirements(parsed) if hasattr(parsed, 'native') and parsed.native: install_tensorflow()
ansi.foreground(ansi.YELLOW, 'Python ' + env.PYTHON_VERSION), ansi.foreground(ansi.YELLOW, 'Lore ' + __version__) ) lore_no_env = False if hasattr(sys, 'lore_no_env'): lore_no_env = sys.lore_no_env no_env_commands = ['--version', 'install', 'init', 'server'] if len(sys.argv) > 1 and os.path.basename(sys.argv[0]) in ['lore', 'lore.exe'] and sys.argv[1] in no_env_commands: lore_no_env = True if '--no-env' in sys.argv: lore_no_env = True if not lore_no_env: # everyone else gets validated and launched on import env.validate() env.launch() if env.launched(): print(banner()) logger.info(banner()) logger.debug('python environment: %s' % env.PREFIX) if not lore_no_env: with timer('check requirements', logging.DEBUG): env.check_requirements()