Пакетный менеджер для Windows. Chocolatey
Наиболее популярным пакетным менеджером для Windows является Chocolatey.
1 Ресурсы
- Домашняя страница: https://chocolatey.org/
- Репозиторий: https://github.com/chocolatey/choco
2 Установка Chocolatey
- Порядок установки описан на странице https://chocolatey.org/install.
- Установка проводится в PowerShell.
- PowerShell должен быть запущен с правами администратора.
- Проще всего запустить его комбинаций клавиш Win+X .
3 Дополнительные настройки
Для того, чтобы установка происходила без запроса подтверждения, можно сделать следующую настройку:
Обратно включить запрос подтверждения можно командой:
4 Пакеты
Список пакетов находится на странице https://chocolatey.org/packages.
5 Работа с программным обеспечением
5.1 Сервисные функции
Информация по ключам командной строки:
Список пакетов в репозитории:
Список установленных пакетов:
5.2 Установка пакета
Для установки пакета нужно выполнить команду:
Чтобы установить без запроса на подтверждение, следует добавить ключ y :
5.3 Удаление пакета
Для удаления пакета нужно выполнить команду:
5.4 Обновление пакетов
Для обновления пакета нужно выполнить команду:
Для обновления всех установленных пакетов нужно выполнить команду:
5.5 Автоматическое обновление пакетов
Для автоматического обновления пакетов используется пакет choco-upgrade-all-at :
Обновление можно выполнить командой:
Чтобы задать время обновления, нужно устанавливать с определёнными параметрами:
если не указывать никаких параметров, choco-upgrade-all-at по умолчанию будет запускаться ежедневно в 2 часа ночи и прерываться в 4 часа ночи;
запуск choco upgrade all -y ежедневно (по умолчанию) в 23:00 и прерывание в 1:00 ( по умолчанию ABORTTIME равно +2 часа):
запуск choco upgrade all -y ежедневно в 4:00 и прерывание в 8:00:
запуск choco upgrade all -y каждое воскресенье в 1:00 и прерывание в 3:00:
Как установить chocolatey на windows 10
Watch videos, read documentation, and hear Chocolatey success stories from companies you trust.
Events
Find past and upcoming webinars, workshops, and conferences. New events have recently been added!
Courses
Step-by-step guides for all things Chocolatey! Earn badges as you learn through interactive digital courses.
Join the Chocolatey Team on our regular monthly stream where we discuss all things Community, what we do, how you can get involved and answer your Chocolatey questions.

Join the Chocolatey Team on our regular monthly stream where we put a spotlight on the most recent Chocolatey product releases. You’ll have a chance to have your questions answered in a live Ask Me Anything format.

Livestream from
Thursday, 06 October 2022We recently released our largest update to Chocolatey Central Management so far. Join Gary and Steph to find out more about Chocolatey Central Management and the new features and fixes we’ve added to this release.

Webinar Replay from
Wednesday, 30 March 2022At Chocolatey Software we strive for simple, and teaching others. Let us teach you just how simple it could be to keep your 3rd party applications updated across your devices, all with Intune!

Livestream from
Thursday, 9 June 2022Join James and Josh to show you how you can get the Chocolatey For Business recommended infrastructure and workflow, created, in Azure, in around 20 minutes.

Livestream from
Thursday, 04 August 2022Join Paul and Gary to hear more about the plans for the Chocolatey CLI in the not so distant future. We’ll talk about some cool new features, long term asks from Customers and Community and how you can get involved!

Livestreams from
October 2022For Hacktoberfest, Chocolatey ran a livestream every Tuesday! Re-watch Cory, James, Gary, and Rain as they share knowledge on how to contribute to open-source projects such as Chocolatey CLI.

Livestream from
Thursday, 03 November 2022Join Paul and Gary for this months Chocolatey product livestream where we look at the latest release of Chocolatey 1.2.0, Chocolatey Licensed Extension 5.0.0 and shine a spotlight on the new hook scripts functionality. This opens up so many possibilities for Chocolatey CLI users!

Livestream from
Tuesday, 29 November 2022Join Josh as he adds the ability to manage Chocolatey GUI config and features with the Chocolatey Ansible Collection.

Webinar from
Tuesday, 13 December 2022Join Gary, Paul, and Maurice as they introduce and demonstrate how to use Chocolatey! Questions will be answered live in an Ask Me Anything format.
- Overview
- Product
- Solutions
- Community
- About
- Try It Now
Chocolatey is a software management solution unlike anything else you’ve ever experienced on Windows. Chocolatey brings the concepts of true package management to allow you to version things, manage dependencies and installation order, better inventory management, and other features.
Chocolatey for Business (C4B) is the enterprise offering that enables companies to adopt a DevOps approach to managing their Windows environment, allowing you to deliver applications to your users more reliably and faster.
Pro is a personal, named license that grants having licensed versions of Chocolatey on up to 8 machines and provides the ultimate Chocolatey experience!
Chocolatey has the largest online registry of Windows packages. Learn how Open Source Chocolatey can support your next project.
Learn the difference between the Chocolatey Editions and what will fit your needs the best.
I’m ready to get started now!
Find past and upcoming webinars, workshops, and conferences.
Chocolatey for Business (C4B) is the enterprise offering that enables companies to adopt a DevOps approach to managing their Windows environment, allowing you to deliver applications to your users more reliably and faster.
Chocolatey provides a unique approach to managing your end-user software (desktops / laptops) and can be combined with your existing solutions. Chocolatey for Business (C4B) enables better security, enhanced visibility with centralized reporting, and a self-service GUI. Self-Service Anywhere allows non-administrators to easily access and manage IT approved software from the office, from home, or anywhere they have an internet connection.
We often hear from System Engineers that they are looking for a simple way to manage Windows endpoints, which also provides advanced functionality when needed. This can be especially important when you need to ensure the most up to date software is deployed (e.g new versions or critical patches). We are excited to add Deployments to Chocolatey Central Management (CCM) which will provide IT teams the ability to easily orchestrate simple or complex scenarios in a fraction of the time over traditional approaches.
The Quick Deployment Environment (QDE) provides a single virtual machine appliance to be imported into your hypervisor-of-choice, which contains most of the various components of a Chocolatey organizational solution. Deploy recommended architecture in 2-3 hours.
Chocolatey customers are some of the largest and most secure organizations in the world. We have created a best-practice solution called Offline Deployments based on our customer’s complex IT landscape and security constraints. This Solution Brief describes the Offline Deployment solution and offers a choice of three patterns. The pattern you choose depends on the constraints you have, and those constraints are often security constraints.
How to install chocolatey/choco on Windows 10
In this article, I will show you how to install Chocolatey on Windows 10. Chocolatey is an easy-to-use Software Package Manager for Windows similar to apt on ubuntu/debian or brew on OSX.
Steps to Install chocolatey/choco on Windows 10
- Click Start and type “powershell“
- Right-click Windows Powershell and choose “Run as Administrator“
- Paste the following command into Powershell and press enter.
- Answer Yes when prompted
- Close and reopen an elevated PowerShell window to start using choco
Choco is now installed and can be used from a PowerShell prompt or a regular command prompt windows to install many different software packages. Whichever one you use, just make sure you run choco from an elevated powershell/command prompt window.
Package Search with choco
choco search [keyword]
You can search the choco repository to see exactly what software chocolatey can install.Passing in the -v flag will give you more detailed information about each package.
choco search hugo -vI commonly use choco to install & update Hugo and sometimes Python3. Hugo is a excellent Static Website Generator written Go. Let’s try installing it!
Install software with choco
choco install [packagename]
Upgrade software with choco
choco upgrade [packagename]
Installing choco updates
choco upgrade chocolatey
Choco can also upgrade itself.List Packages installed by Choco
choco list —local-only
Advanced choco usage examples
Now that we have covered the basics, let’s look at some advanced choco examples.
choco install chrome —yes The -y, —yes switch will make choco install without asking you any questions. This is useful if you are using choco in a batch file or powershell script. choco search Git -ev The -v, —verbose switch will print detailed package information but the search keyword usually matches multiple packages and it all goes flying by.
The -e, —exact flag will narrow down the output to one particular packgae. choco search Git -ea Adding the -a, —all switch will list all versions of a specific package. choco search python —order-by-popularity The —order-by-popularity switch will sort the search results, most popular packages first.More Useful Software to Install with choco
Here is a list of useful software that I use, they can all be installed using choco.
- choco install chrome – Google Chrome Browser
- choco install git – Git cli Client for Windows
- choco install github – Official GUI-Based Git Client
- choco install 7zip – Archive utility to compress/uncompress zip, tar, gz, bzip and other formats.
- choco install SublimeText3 – An execellent markdown & source code editor.
- choco install vlc – An open-source media player
- choco install putty – An open-source SSH client
- choco install keepass – An open-source Password Manager
- choco install greenshot – My favorite screenshot utility for Windows
- choco install imagemagick.app – A suite of cli tools for working with and converting images
Thanks for following along, I hope you enjoyed this guide. Installing software on Windows with choco is a breeze. You will never want to go back to the Next, Next, Next, Finish GUI-based software installers.
If you’ve enjoyed this article about Chocolatey, please take a moment to leave a comment below or share it on social media. – JCutrer
References
Amazon AWS too complex and expensive? You will love the simplicity of DigitalOcean. Deploy your next app in seconds. Get $100 in cloud credits from DigitalOcean
Ad Notice I will receive a small commission that helps support this blog at no cost to you.
Установка Chocolately, Python, Visual Studio Code и virtualenv на Windows
В одной из прошлых статей я разбирался как настроить python и virualenv на Mac OS. Но, в связи с переездом на Windows, в этой статье коротко расскажу как настроить python, visual studio code и virtualenv на этой операционно.
Материал подготовлен на основании уроков Яндекс Практикум. Мой отзыв на обучение в Яндекс Практикум по направлению “Анализ данных”.
Этапы
- Запуск PowerShell
- Установка Chocolately.
- Установка Python 3.
- Установка Visual Studio Code.
- Установка virtualenv.
- Создание виртуального окружения.
1. Запуск PowerShell
Так как я работаю на Windows 10, я использую оболочку PowerShell. Чтобы запустить powershell, на рабочем столе нажимаем сочетание клавиш CTRL+X, в открывшемся меню выбираем “Window PowerShell (администратор)”.
Замена командной строки на PowerShell
Если вы работаете на Windows 10, но в указанном месте у вас опции “Командная строка”, надо перейти в настройки панели задач и выбрать вариант замены командной строки на PowerShell. Для этого:
- На панели инструментов нажимаем правую кнопку мыши и выбираем опцию “Параметры панели задач”.
2. В открывшемся окне активируем опцию “Заменить командную строку оболочкой Windows PowerShell…”.
Несколько полезных команд PowerShell / командной строки
Создать новую папку:
Где folder_name — название папки.
Перейти в папку:
Перейти из папки на уровень выше:
Перейти на другой диск:
Показать содержимое папки:
Очистить экран PowerShell / командной строки
2. Установка Chocolately
Chocolately — это пакетный менеджер, используя который можно устанавливать некоторые программы из командной строки.
Для установки менеджера в запущенном от имени администратора PowerShell вставляем код ниже:
После установки этого менеджера, другие программы можно установить через командную строку набрав следующий код:
3. Установка Python 3
Продолжаем устанавливать нужные программы через командную строку. Для установки Python 3 вводим код:
4. Установка Visual Studio Code
Visual Studio Code — GUI, который помогает более комфортно работать с кодом (писать, тестировать, сохранять и т.д.).
Для установки Visual Studio Code через PowerShell / командную строку вводим команду:
Эта команда, кроме установки VSC так же установит GIT (менеджер контроля версий).
5. Установка virtualenv
Virtualenv — средство для создания виртуальных окружений, которое поможет решать проблемы совместимости разных версий пакетов.
Все также в PowerShell вводим команду:
6. Создание виртуального окружения
Создаем папку, в которой будет храниться нужное виртуально окружение. Переходим в нее и набираем в PowerShell команду создания нового виртуального окружения:
Где env_name — название окружения.
Чтобы запустить созданное виртуальное окружение, набираем команду:
Если все сделано верно и виртуально окружение запустилось, в PowerShell напротив активной строки появится название виртуального окружения.
Чтобы выключить виртуальное окружение, достаточно набрать команду:
Надеюсь, эта инструкция поможет вам быстро установить и настроить Chocolately, Python 3, Visual Studio Code и virtualenv на Windows.