How to Create Conda Virtual Environment and Install dependencies with One command | Python
Saving data in working with Data Science projects is very important. Many Data Scientists every day build, remove, and manipulate Python virtual environments. Then install and uninstall dependencies with requirements.txt again and again. Human error rate is very high as doing these project setup steps on a daily basis. Did you ever think to do all these actions just by one command line in your terminal?
It is possible by using YAML (.yml) files, where you can set your virtual environments parameters, such as name, Python version, and all dependencies (modules and packages that you are going to use in your project). Also you can define channels where a YAML file will look to find your dependencies. Basically, YAML is a human-readable data serialization standard that can be used in conjunction with all programming languages and is often used to write configuration files.
You can run a special command in a terminal (Mac or Windows) which triggers that YAML (.yml) file and processes which build your Python virtual environment and install all required dependencies immediately in just a few seconds. By using this solution in managing your Python project you can save a lot of time, be sure that your project will work on any computer and avoid a headache in your daily basis routine. So, welcome to this tutorial and let's go!
The content of the video:
0:00 - Intro
1:39 - Part 1. Python project as an example
2:01 - Part 2. Dependencies which you need
2:28 - Part 3. Generate YAML (.yml) file for your project
5:12 - Part 4. Run Terminal command to execute yml file
6:08 - Results. Demonstration of Python application in new conda environment
In YAML file, there you should set a name of your virtual environment, channels (default, conda-forge, etc.), and list of modules with Python packages being used in your project.
In order to successfully complete this tutorial, download Anaconda for both Mac/Windows from this link: https://www.anaconda.com/products/individual
For this tutorial I am using Mac Terminal. It would be great that you know some basics of terminal commands, such as pwd, cd, and have a common understanding about virtual environments in Python.
YAML files with virtual environments are also widely used in both MLOps and DevOps for various purposes. If you got the idea how the execution of the command demonstrated in this video is working, do not stop and go further with experimenting with YAML files and Development managements towards, including Github actions, Dockers, Kubernetes, different Cloud systems, and much more. If you feel this domain is promising, let me know, I will keep it in mind by planning my next videos. Thank you!
#yaml #virtualenvironment #conda
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «How to Create Conda Virtual Environment and Install dependencies with One command | Python», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.