LoginSignup
13
16

More than 5 years have passed since last update.

Windows環境にchocolateyをインストールし、使う

Posted at

chocolateyとは

Windowsで使えるパッケージマネージャ
簡単にいろいろなツールをインストールできるため、おすすめ
https://chocolatey.org/

Requirements

公式ページよりコピー
- Windows 7+ / Windows Server 2003+
- PowerShell v2+
- .NET Framework 4+ (the installation will attempt to install .NET 4.0 if you do not have it installed)

That's it! All you need is choco.exe (that you get from the installation - scripts) and you are good to go! No Visual Studio required.

インストール

詳しいことは公式ページ
https://chocolatey.org/install
に書かれているが、ここにもメモをしておく。
管理者権限でcmd.exeを開く

cmd.exe
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

Proxyサーバを使用している場合は下記のスクリプト

cmd.exe
@powershell -NoProfile -ExecutionPolicy Bypass -Command "[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

使用例

Google Chromeをインストールしてみる

choco install googlechrome

PythonのディストリビューションAnacondaを検索してみる


> choco search anaconda
Chocolatey v0.10.9
anaconda3 5.0.1 [Approved]
Miniconda 4.3.21 [Approved] Downloads cached for licensed users
miniconda3 4.4.10 [Approved]
anaconda2 5.0.1 [Approved]
nteract 0.8.4 [Approved] Downloads cached for licensed users
nteract.install 0.1.0.20170315 [Approved] Downloads cached for licensed users
6 packages found.

インストールできるパッケージ

https://chocolatey.org/packages
上記のサイトにあるものがインストールできるようです。

感想

便利だが、そもそも開発環境としてWindowsを選択したくないなあ。
Dockerを使える環境なら、Docker上のLinuxに開発環境を構築した方がよいと思います。

13
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
16