タグ: Install

  • Install the GitHub CLI (gh) command

    PS C:\Users\user> choco install gh

    Chocolatey v2.2.2

    Installing the following packages:

    gh

    By installing, you accept licenses for the packages.

    Progress: Downloading gh 2.36.0… 100%

    gh v2.36.0 [Approved]

    gh package files install completed. Performing other installation steps.

    The package gh wants to run ‘chocolateyInstall.ps1’.

    Note: If you don’t run this script, the installation will fail.

    Note: To confirm automatically next time, use ‘-y’ or consider:

    choco feature enable -n allowGlobalConfirmation

    Do you want to run the script?([Y]es/[A]ll – yes to all/[N]o/[P]rint): y

    Installing 64-bit gh…

    gh has been installed.

      gh may be able to be automatically uninstalled.

    Environment Vars (like PATH) have changed. Close/reopen your shell to

     see the changes (or in powershell/cmd.exe just type `refreshenv`).

     The install of gh was successful.

      Software installed as ‘MSI’, install location is likely default.

    Chocolatey installed 1/1 packages.

     See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

    PS C:\Users\user>

    PS C:\Users\user> gh

    Work seamlessly with GitHub from the command line.

    USAGE

      gh <command> <subcommand> [flags]

    CORE COMMANDS

      auth:        Authenticate gh and git with GitHub

      browse:      Open the repository in the browser

      codespace:   Connect to and manage codespaces

      gist:        Manage gists

      issue:       Manage issues

      org:         Manage organizations

      pr:          Manage pull requests

      project:     Work with GitHub Projects.

      release:     Manage releases

      repo:        Manage repositories

    GITHUB ACTIONS COMMANDS

      cache:       Manage Github Actions caches

      run:         View details about workflow runs

      workflow:    View details about GitHub Actions workflows

    ALIAS COMMANDS

      co:          Alias for “pr checkout”

    ADDITIONAL COMMANDS

      alias:       Create command shortcuts

      api:         Make an authenticated GitHub API request

      completion:  Generate shell completion scripts

      config:      Manage configuration for gh

      extension:   Manage gh extensions

      gpg-key:     Manage GPG keys

      label:       Manage labels

      ruleset:     View info about repo rulesets

      search:      Search for repositories, issues, and pull requests

      secret:      Manage GitHub secrets

      ssh-key:     Manage SSH keys

      status:      Print information about relevant issues, pull requests, and notifications across repositories

      variable:    Manage GitHub Actions variables

    HELP TOPICS

      actions:     Learn about working with GitHub Actions

      environment: Environment variables that can be used with gh

      exit-codes:  Exit codes used by gh

      formatting:  Formatting options for JSON data exported from gh

      mintty:      Information about using gh with MinTTY

      reference:   A comprehensive reference of all gh commands

    FLAGS

      –help      Show help for command

      –version   Show gh version

    EXAMPLES

      $ gh issue create

      $ gh repo clone cli/cli

      $ gh pr checkout 321

    LEARN MORE

      Use ‘gh <command> <subcommand> –help’ for more information about a command.

      Read the manual at https://cli.github.com/manual

    PS C:\Users\user> gh –version

    gh version 2.36.0 (2023-10-03)

    https://github.com/cli/cli/releases/tag/v2.36.0

    PS C:\Users\user>

  • Dart install, setting

    C:\Users\user>choco install dart-sdk

    Chocolatey v2.2.2

    3 validations performed. 2 success(es), 1 warning(s), and 0 error(s).

    Validation Warnings:

     – A pending system reboot request has been detected, however, this is

       being ignored due to the current Chocolatey configuration.  If you

       want to halt when this occurs, then either set the global feature

       using:

         choco feature enable –name=”exitOnRebootDetected”

       or pass the option –exit-when-reboot-detected.

    Installing the following packages:

    dart-sdk

    By installing, you accept licenses for the packages.

    Progress: Downloading dart-sdk 3.1.2… 100%

    dart-sdk v3.1.2 [Approved]

    dart-sdk package files install completed. Performing other installation steps.

    The package dart-sdk wants to run ‘chocolateyInstall.ps1’.

    Note: If you don’t run this script, the installation will fail.

    Note: To confirm automatically next time, use ‘-y’ or consider:

    choco feature enable -n allowGlobalConfirmation

    Do you want to run the script?([Y]es/[A]ll – yes to all/[N]o/[P]rint): y

    PATH environment variable does not have C:\tools\dart-sdk\bin in it. Adding…

    PATH environment variable does not have C:\Users\user\AppData\Local\Pub\Cache\bin in it. Adding…

    Downloading dart-sdk 64 bit

      from ‘https://storage.googleapis.com/dart-archive/channels/stable/release/3.1.2/sdk/dartsdk-windows-x64-release.zip’

    Progress: 100% – Completed download of C:\Users\user\AppData\Local\Temp\dart-sdk\3.1.2\dartsdk-windows-x64-release.zip (196.46 MB).

    Download of dartsdk-windows-x64-release.zip (196.46 MB) completed.

    Hashes match.

    Extracting C:\Users\user\AppData\Local\Temp\dart-sdk\3.1.2\dartsdk-windows-x64-release.zip to C:\tools…

    C:\tools

    Environment Vars (like PATH) have changed. Close/reopen your shell to

     see the changes (or in powershell/cmd.exe just type `refreshenv`).

     The install of dart-sdk was successful.

      Software installed to ‘C:\tools’

    Chocolatey installed 1/1 packages.

     See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

    C:\Users\user>

    PS C:\Users\user> dart –version
    Dart SDK version: 3.1.2 (stable) (Tue Sep 12 16:26:23 2023 +0000) on “windows_x64”

  • matplotlib Plot Lissajous


    Plot Lissajous

    lissajous_01.pdf (uec.ac.jp)

    import matplotlib.pyplot as plt
    import numpy as np

    a = [1,1,1,2,5]
    b = [1,2,3,3,6]
    d= [0,30,60,90]
    delta = np.pi/2
    t = np.linspace(0,np.pi*2,300)

    for i in range(0,5):
    for j in range(0,4):
    x = np.cos(a[i] * t )
    y = np.cos(b[i] * t+ d[j]*np.pi/180)
    fig, ax = plt.subplots()
    ax.plot(x, y)

    plt.show()


    Plot Sin Curve

    PS C:\Users\user> python
    Python 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)] on win32
    Type “help”, “copyright”, “credits” or “license” for more information.

    >
    >

    import matplotlib.pyplot as plt
    import numpy as np

    x = np.linspace(0, 2 * np.pi, 200)
    y = np.sin(x)

    fig, ax = plt.subplots()
    ax.plot(x, y)

    plt.show()

    Getting started — Matplotlib 3.7.1 documentation


    Installation — Matplotlib 3.7.1 documentation

    PS C:\Users\user> pip install matplotlib
    Collecting matplotlib
    Using cached matplotlib-3.7.1-cp311-cp311-win_amd64.whl (7.6 MB)
    Collecting contourpy>=1.0.1 (from matplotlib)
    Using cached contourpy-1.0.7-cp311-cp311-win_amd64.whl (162 kB)
    Collecting cycler>=0.10 (from matplotlib)
    Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
    Requirement already satisfied: fonttools>=4.22.0 in c:\python311\lib\site-packages (from matplotlib) (4.39.3)
    Requirement already satisfied: kiwisolver>=1.0.1 in c:\python311\lib\site-packages (from matplotlib) (1.4.4)
    Requirement already satisfied: numpy>=1.20 in c:\python311\lib\site-packages (from matplotlib) (1.24.1)
    Requirement already satisfied: packaging>=20.0 in c:\python311\lib\site-packages (from matplotlib) (23.1)
    Requirement already satisfied: pillow>=6.2.0 in c:\python311\lib\site-packages (from matplotlib) (9.3.0)
    Requirement already satisfied: pyparsing>=2.3.1 in c:\python311\lib\site-packages (from matplotlib) (3.0.9)
    Collecting python-dateutil>=2.7 (from matplotlib)
    Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
    Requirement already satisfied: six>=1.5 in c:\python311\lib\site-packages (from python-dateutil>=2.7->matplotlib) (1.16.0)
    Installing collected packages: python-dateutil, cycler, contourpy, matplotlib
    Successfully installed contourpy-1.0.7 cycler-0.11.0 matplotlib-3.7.1 python-dateutil-2.8.2
    PS C:\Users\user>

    PS C:\Users\user> pip list
    Package Version

    certifi 2022.12.7
    charset-normalizer 2.1.1
    contourpy 1.0.7
    cycler 0.11.0
    filelock 3.9.0
    fonttools 4.39.3
    idna 3.4
    Jinja2 3.1.2
    kiwisolver 1.4.4
    MarkupSafe 2.1.2
    matplotlib 3.7.1
    mpmath 1.2.1
    networkx 3.0
    numpy 1.24.1
    packaging 23.1
    Pillow 9.3.0
    pip 23.1.1
    pyparsing 3.0.9
    python-dateutil 2.8.2
    requests 2.28.1
    setuptools 65.5.0
    six 1.16.0
    sympy 1.11.1
    torch 2.0.0+cu118
    torchaudio 2.0.1+cu118
    torchvision 0.15.1+cu118
    typing_extensions 4.4.0
    urllib3 1.26.13
    PS C:\Users\user>

  • Chocolatey Tips

    Start Locally | PyTorch

    PS C:\Users\user> choco install python
    Chocolatey v1.3.1
    Installing the following packages:
    python
    By installing, you accept licenses for the packages.
    Progress: Downloading python3 3.11.3… 100%
    Progress: Downloading python311 3.11.3… 100%
    Progress: Downloading vcredist2015 14.0.24215.20170201… 100%
    Progress: Downloading vcredist140 14.34.31938… 100%
    Progress: Downloading chocolatey-core.extension 1.4.0… 100%
    Progress: Downloading chocolatey-compatibility.extension 1.0.0… 100%
    Progress: Downloading KB3033929 1.0.5… 100%
    Progress: Downloading chocolatey-windowsupdate.extension 1.0.5… 100%
    Progress: Downloading KB3035131 1.0.3… 100%
    Progress: Downloading KB2919355 1.0.20160915… 100%
    Progress: Downloading KB2919442 1.0.20160915… 100%
    Progress: Downloading KB2999226 1.0.20181019… 100%
    Progress: Downloading python 3.11.3… 100%

    chocolatey-compatibility.extension v1.0.0 [Approved]
    chocolatey-compatibility.extension package files install completed. Performing other installation steps.
    Installed/updated chocolatey-compatibility extensions.
    The install of chocolatey-compatibility.extension was successful.
    Software installed to ‘C:\ProgramData\chocolatey\extensions\chocolatey-compatibility’

    chocolatey-core.extension v1.4.0 [Approved]
    chocolatey-core.extension package files install completed. Performing other installation steps.
    Installed/updated chocolatey-core extensions.
    The install of chocolatey-core.extension was successful.
    Software installed to ‘C:\ProgramData\chocolatey\extensions\chocolatey-core’

    chocolatey-windowsupdate.extension v1.0.5 [Approved]
    chocolatey-windowsupdate.extension package files install completed. Performing other installation steps.
    Installed/updated chocolatey-windowsupdate extensions.
    The install of chocolatey-windowsupdate.extension was successful.
    Software installed to ‘C:\ProgramData\chocolatey\extensions\chocolatey-windowsupdate’

    KB3035131 v1.0.3 [Approved]
    kb3035131 package files install completed. Performing other installation steps.
    The package KB3035131 wants to run ‘ChocolateyInstall.ps1’.
    Note: If you don’t run this script, the installation will fail.
    Note: To confirm automatically next time, use ‘-y’ or consider:
    choco feature enable -n allowGlobalConfirmation
    Do you want to run the script?([Y]es/[A]ll – yes to all/[N]o/[P]rint): y

    Skipping installation because update KB3035131 does not apply to this operating system (Microsoft Windows 11 Pro).
    The install of kb3035131 was successful.
    Software install location not explicitly set, it could be in package or
    default install location of installer.

    KB3033929 v1.0.5 [Approved]
    kb3033929 package files install completed. Performing other installation steps.
    The package KB3033929 wants to run ‘ChocolateyInstall.ps1’.
    Note: If you don’t run this script, the installation will fail.
    Note: To confirm automatically next time, use ‘-y’ or consider:
    choco feature enable -n allowGlobalConfirmation
    Do you want to run the script?([Y]es/[A]ll – yes to all/[N]o/[P]rint): y

    Skipping installation because update KB3033929 does not apply to this operating system (Microsoft Windows 11 Pro).
    The install of kb3033929 was successful.
    Software install location not explicitly set, it could be in package or
    default install location of installer.

    KB2919442 v1.0.20160915 [Approved]
    kb2919442 package files install completed. Performing other installation steps.
    The package KB2919442 wants to run ‘ChocolateyInstall.ps1’.
    Note: If you don’t run this script, the installation will fail.
    Note: To confirm automatically next time, use ‘-y’ or consider:
    choco feature enable -n allowGlobalConfirmation
    Do you want to run the script?([Y]es/[A]ll – yes to all/[N]o/[P]rint): y

    Skipping installation because this hotfix only applies to Windows 8.1 and Windows Server 2012 R2.
    The install of kb2919442 was successful.
    Software install location not explicitly set, it could be in package or
    default install location of installer.

    KB2919355 v1.0.20160915 [Approved]
    kb2919355 package files install completed. Performing other installation steps.
    The package KB2919355 wants to run ‘ChocolateyInstall.ps1’.
    Note: If you don’t run this script, the installation will fail.
    Note: To confirm automatically next time, use ‘-y’ or consider:
    choco feature enable -n allowGlobalConfirmation
    Do you want to run the script?([Y]es/[A]ll – yes to all/[N]o/[P]rint): y

    Skipping installation because this hotfix only applies to Windows 8.1 and Windows Server 2012 R2.
    The install of kb2919355 was successful.
    Software install location not explicitly set, it could be in package or
    default install location of installer.

    KB2999226 v1.0.20181019 [Approved] – Possibly broken
    kb2999226 package files install completed. Performing other installation steps.
    The package KB2999226 wants to run ‘chocolateyinstall.ps1’.
    Note: If you don’t run this script, the installation will fail.
    Note: To confirm automatically next time, use ‘-y’ or consider:
    choco feature enable -n allowGlobalConfirmation
    Do you want to run the script?([Y]es/[A]ll – yes to all/[N]o/[P]rint): y

    Skipping installation because update KB2999226 does not apply to this operating system (Microsoft Windows 11 Pro).
    The install of kb2999226 was successful.
    Software install location not explicitly set, it could be in package or
    default install location of installer.

    vcredist140 v14.34.31938 [Approved]
    vcredist140 package files install completed. Performing other installation steps.
    The package vcredist140 wants to run ‘chocolateyInstall.ps1’.
    Note: If you don’t run this script, the installation will fail.
    Note: To confirm automatically next time, use ‘-y’ or consider:
    choco feature enable -n allowGlobalConfirmation
    Do you want to run the script?([Y]es/[A]ll – yes to all/[N]o/[P]rint): y

    WARNING: Skipping installation of runtime for architecture x86 version 14.34.31938 because a newer version (14.36.32522) is already installed.
    WARNING: Skipping installation of runtime for architecture x64 version 14.34.31938 because a newer version (14.36.32522) is already installed.
    The install of vcredist140 was successful.
    Software install location not explicitly set, it could be in package or
    default install location of installer.

    vcredist2015 v14.0.24215.20170201 [Approved]
    vcredist2015 package files install completed. Performing other installation steps.
    The install of vcredist2015 was successful.
    Software installed to ‘C:\ProgramData\chocolatey\lib\vcredist2015’

    python311 v3.11.3 [Approved]
    python311 package files install completed. Performing other installation steps.
    The package python311 wants to run ‘chocolateyInstall.ps1’.
    Note: If you don’t run this script, the installation will fail.
    Note: To confirm automatically next time, use ‘-y’ or consider:
    choco feature enable -n allowGlobalConfirmation
    Do you want to run the script?([Y]es/[A]ll – yes to all/[N]o/[P]rint): y

    Installing 64-bit python311…
    python311 has been installed.
    Added C:\ProgramData\chocolatey\bin\python3.11.exe shim pointed to ‘c:\python311\python.exe’.
    Python installed to: ‘C:\Python311’
    Restricting write permissions to Administrators
    python311 can be automatically uninstalled.
    Environment Vars (like PATH) have changed. Close/reopen your shell to
    see the changes (or in powershell/cmd.exe just type refreshenv).
    The install of python311 was successful.
    Software installed as ‘exe’, install location is likely default.

    python3 v3.11.3 [Approved]
    python3 package files install completed. Performing other installation steps.
    The install of python3 was successful.
    Software installed to ‘C:\ProgramData\chocolatey\lib\python3’

    python v3.11.3 [Approved]
    python package files install completed. Performing other installation steps.
    The install of python was successful.
    Software installed to ‘C:\ProgramData\chocolatey\lib\python’

    Chocolatey installed 13/13 packages.
    See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

    Installed:

    • kb3033929 v1.0.5
    • python3 v3.11.3
    • chocolatey-windowsupdate.extension v1.0.5
    • vcredist140 v14.34.31938
    • kb2999226 v1.0.20181019
    • kb2919355 v1.0.20160915
    • chocolatey-core.extension v1.4.0
    • python311 v3.11.3
    • kb2919442 v1.0.20160915
    • vcredist2015 v14.0.24215.20170201
    • chocolatey-compatibility.extension v1.0.0
    • kb3035131 v1.0.3
    • python v3.11.3
      PS C:\Users\user>

    Chocolatey Software | MinGW-w64 11.2.0.07112021

    PS C:\Users\user> choco install mingw
    Chocolatey v1.1.0
    Installing the following packages:
    mingw
    By installing, you accept licenses for the packages.
    Progress: Downloading mingw 11.2.0.07112021… 100%

    mingw v11.2.0.07112021 [Approved]
    mingw package files install completed. Performing other installation steps.
    The package mingw wants to run ‘chocolateyinstall.ps1’.
    Note: If you don’t run this script, the installation will fail.
    Note: To confirm automatically next time, use ‘-y’ or consider:
    choco feature enable -n allowGlobalConfirmation
    Do you want to run the script?([Y]es/[A]ll – yes to all/[N]o/[P]rint): y

    Downloading mingw 64 bit
    from ‘https://github.com/brechtsanders/winlibs_mingw/releases/download/11.2.0-12.0.1-9.0.0-r1/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64-9.0.0-r1.7z’
    Progress: 100% – Completed download of C:\Users\user\AppData\Local\Temp\chocolatey\mingw\11.2.0.07112021\winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64-9.0.0-r1.7z (63.33 MB).
    Download of winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64-9.0.0-r1.7z (63.33 MB) completed.
    Hashes match.
    Extracting C:\Users\user\AppData\Local\Temp\chocolatey\mingw\11.2.0.07112021\winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64-9.0.0-r1.7z to C:\ProgramData\chocolatey\lib\mingw\tools\install…
    C:\ProgramData\chocolatey\lib\mingw\tools\install
    Testing path: C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw32\bin
    Testing path: C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
    PATH environment variable does not have C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin in it. Adding…
    Environment Vars (like PATH) have changed. Close/reopen your shell to
    see the changes (or in powershell/cmd.exe just type refreshenv).
    ShimGen has successfully created a shim for addr2line.exe
    ShimGen has successfully created a shim for ar.exe
    ShimGen has successfully created a shim for as.exe
    ShimGen has successfully created a shim for c++.exe
    ShimGen has successfully created a shim for c++filt.exe
    ShimGen has successfully created a shim for ccache.exe
    ShimGen has successfully created a shim for cpp.exe
    ShimGen has successfully created a shim for dlltool.exe
    ShimGen has successfully created a shim for dllwrap.exe
    ShimGen has successfully created a shim for dos2unix.exe
    ShimGen has successfully created a shim for doxygen.exe
    ShimGen has successfully created a shim for elfedit.exe
    ShimGen has successfully created a shim for g++.exe
    ShimGen has successfully created a shim for gcc-ar.exe
    ShimGen has successfully created a shim for gcc-nm.exe
    ShimGen has successfully created a shim for gcc-ranlib.exe
    ShimGen has successfully created a shim for gcc.exe
    ShimGen has successfully created a shim for gcov-dump.exe
    ShimGen has successfully created a shim for gcov-tool.exe
    ShimGen has successfully created a shim for gcov.exe
    ShimGen has successfully created a shim for gdb.exe
    ShimGen has successfully created a shim for gdbserver.exe
    ShimGen has successfully created a shim for gdc.exe
    ShimGen has successfully created a shim for gendef.exe
    ShimGen has successfully created a shim for genidl.exe
    ShimGen has successfully created a shim for gfortran.exe
    ShimGen has successfully created a shim for gprof.exe
    ShimGen has successfully created a shim for iconv.exe
    ShimGen has successfully created a shim for ld.bfd.exe
    ShimGen has successfully created a shim for ld.exe
    ShimGen has successfully created a shim for lto-dump.exe
    ShimGen has successfully created a shim for mac2unix.exe
    ShimGen has successfully created a shim for mingw32-make.exe
    ShimGen has successfully created a shim for ninja.exe
    ShimGen has successfully created a shim for nm.exe
    ShimGen has successfully created a shim for objcopy.exe
    ShimGen has successfully created a shim for objdump.exe
    ShimGen has successfully created a shim for pexports.exe
    ShimGen has successfully created a shim for ranlib.exe
    ShimGen has successfully created a shim for readelf.exe
    ShimGen has successfully created a shim for size.exe
    ShimGen has successfully created a shim for strings.exe
    ShimGen has successfully created a shim for strip.exe
    ShimGen has successfully created a shim for unix2dos.exe
    ShimGen has successfully created a shim for unix2mac.exe
    ShimGen has successfully created a shim for windmc.exe
    ShimGen has successfully created a shim for windres.exe
    ShimGen has successfully created a shim for x86_64-w64-mingw32-c++.exe
    ShimGen has successfully created a shim for x86_64-w64-mingw32-g++.exe
    ShimGen has successfully created a shim for x86_64-w64-mingw32-gcc-11.2.0.exe
    ShimGen has successfully created a shim for x86_64-w64-mingw32-gcc-ar.exe
    ShimGen has successfully created a shim for x86_64-w64-mingw32-gcc-nm.exe
    ShimGen has successfully created a shim for x86_64-w64-mingw32-gcc-ranlib.exe
    ShimGen has successfully created a shim for x86_64-w64-mingw32-gcc.exe
    ShimGen has successfully created a shim for x86_64-w64-mingw32-gdc.exe
    ShimGen has successfully created a shim for x86_64-w64-mingw32-gfortran.exe
    ShimGen has successfully created a shim for cc1.exe
    ShimGen has successfully created a shim for cc1obj.exe
    ShimGen has successfully created a shim for cc1objplus.exe
    ShimGen has successfully created a shim for cc1plus.exe
    ShimGen has successfully created a shim for collect2.exe
    ShimGen has successfully created a shim for d21.exe
    ShimGen has successfully created a shim for f951.exe
    ShimGen has successfully created a shim for g++-mapper-server.exe
    ShimGen has successfully created a shim for lto-wrapper.exe
    ShimGen has successfully created a shim for lto1.exe
    ShimGen has successfully created a shim for fixincl.exe
    ShimGen has successfully created a shim for gengtype.exe
    ShimGen has successfully created a shim for ar.exe
    ShimGen has successfully created a shim for as.exe
    ShimGen has successfully created a shim for dlltool.exe
    ShimGen has successfully created a shim for ld.bfd.exe
    ShimGen has successfully created a shim for ld.exe
    ShimGen has successfully created a shim for nm.exe
    ShimGen has successfully created a shim for objcopy.exe
    ShimGen has successfully created a shim for objdump.exe
    ShimGen has successfully created a shim for ranlib.exe
    ShimGen has successfully created a shim for readelf.exe
    ShimGen has successfully created a shim for strip.exe
    The install of mingw was successful.
    Software installed to ‘C:\ProgramData\chocolatey\lib\mingw\tools\install’

    Chocolatey installed 1/1 packages.
    See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

    MinGW-w64


    PS C:\Users\user> choco /?
    This is a listing of all of the different things you can pass to choco.

    DEPRECATION NOTICE

    The shims chocolatey, cinst, clist, cpush, cuninst and cup are deprecated.
    We recommend updating all scripts to use their full command equivalent as these will be
    removed in v2.0.0 of Chocolatey.

    Options and Switches

    -v, –version
    Version – Prints out the Chocolatey version. Available in 0.9.9+.

    Commands

    • find – searches remote or local packages (alias for search)
    • list – lists remote or local packages
    • search – searches remote or local packages
    • help – displays top level help information for choco
    • info – retrieves package information. Shorthand for choco search pkgname –exact –verbose
    • install – installs packages using configured sources
    • pin – suppress upgrades for a package
    • outdated – retrieves information about packages that are outdated. Similar to upgrade all –noop
    • upgrade – upgrades packages from various sources
    • uninstall – uninstalls a package
    • pack – packages nuspec, scripts, and other Chocolatey package resources into a nupkg file
    • push – pushes a compiled nupkg to a source
    • new – creates template files for creating a new Chocolatey package
    • sources – view and configure default sources (alias for source)
    • source – view and configure default sources
    • config – Retrieve and configure config file settings
    • feature – view and configure choco features
    • features – view and configure choco features (alias for feature)
    • setapikey – retrieves, saves or deletes an apikey for a particular source (alias for apikey)
    • apikey – retrieves, saves or deletes an apikey for a particular source
    • unpackself – re-installs Chocolatey base files
    • export – exports list of currently installed packages
    • template – get information about installed templates
    • templates – get information about installed templates (alias for template)

    Please run chocolatey with choco command -help for specific help on
    each command.

    How To Pass Options / Switches

    You can pass options and switches in the following ways:

    • Unless stated otherwise, an option/switch should only be passed one
      time. Otherwise you may find weird/non-supported behavior.
    • -, /, or -- (one character switches should not use --)
    • Option Bundling / Bundled Options: One character switches can be
      bundled. e.g. -d (debug), -f (force), -v (verbose), and -y
      (confirm yes) can be bundled as -dfvy.
    • NOTE: If debug or verbose are bundled with local options
      (not the global ones above), some logging may not show up until after
      the local options are parsed.
    • Use Equals: You can also include or not include an equals sign
      = between options and values.
    • Quote Values: When you need to quote an entire argument, such as
      when using spaces, please use a combination of double quotes and
      apostrophes ("'value'"). In cmd.exe you can just use double quotes
      ("value") but in powershell.exe you should use backticks
      (`"value`") or apostrophes ('value'). Using the combination
      allows for both shells to work without issue, except for when the next
      section applies.
    • Pass quotes in arguments: When you need to pass quoted values to
      to something like a native installer, you are in for a world of fun. In
      cmd.exe you must pass it like this: -ia "/yo=""Spaces spaces""". In
      PowerShell.exe, you must pass it like this: -ia '/yo=""Spaces spaces""'.
      No other combination will work. In PowerShell.exe if you are on version
      v3+, you can try --% before -ia to just pass the args through as is,
      which means it should not require any special workarounds.
    • Periods in PowerShell: If you need to pass a period as part of a
      value or a path, PowerShell doesn’t always handle it well. Please
      quote those values using “Quote Values” section above.
    • Options and switches apply to all items passed, so if you are
      installing multiple packages, and you use --version=1.0.0, choco
      is going to look for and try to install version 1.0.0 of every
      package passed. So please split out multiple package calls when
      wanting to pass specific options.

    Scripting / Integration – Best Practices / Style Guide

    When writing scripts, such as PowerShell scripts passing options and
    switches, there are some best practices to follow to ensure that you
    don’t run into issues later. This also applies to integrations that
    are calling Chocolatey and parsing output. Chocolatey uses
    PowerShell, but it is an exe, so it cannot return PowerShell objects.

    Following these practices ensures both readability of your scripts AND
    compatibility across different versions and editions of Chocolatey.
    Following this guide will ensure your experience is not frustrating
    based on choco not receiving things you think you are passing to it.

    • For consistency, always use choco, not choco.exe. Never use
      shortcut commands like cinst or cup (The shortcuts cinst
      and cup will be removed in v2.0.0).
    • Always have the command as the first argument to choco. e.g.
      choco install, where install is the command.
    • If there is a subcommand, ensure that is the second argument. e.g.
      choco source list, where source is the command and list is the
      subcommand.
    • Typically the subject comes next. If installing packages, the
      subject would be the package names, e.g. choco install pkg1 pkg2.
    • Never use ‘nupkg’ or point directly to a nupkg file UNLESS using
      ‘choco push’. Use the source folder instead, e.g. choco install <package id> --source="'c:\folder\with\package'" instead of
      choco install DoNotDoThis.1.0.nupkg or choco install DoNotDoThis --source="'c:\folder\with\package\DoNotDoThis.1.0.nupkg'".
    • Switches and parameters are called simply options. Options come
      after the subject. e.g. choco install pkg1 --debug --verbose.
    • Never use the force option (--force/-f) in scripts (or really
      otherwise as a default mode of use). Force is an override on
      Chocolatey behavior. If you are wondering why Chocolatey isn’t doing
      something like the documentation says it should, it’s likely because
      you are using force. Stop.
    • Always use full option name. If the short option is -n, and the
      full option is --name, use --name. The only acceptable short
      option for use in scripts is -y. Find option names in help docs
      online or through choco -? /choco [Command Name] -?.
    • For scripts that are running automated, always use -y. Do note
      that even with -y passed, some things / state issues detected will
      temporarily stop for input – the key here is temporarily. They will
      continue without requiring any action after the temporary timeout
      (typically 30 seconds).
    • Full option names are prepended with two dashes, e.g. -- or
      --debug --verbose --ignore-proxy.
    • When setting a value to an option, always put an equals (=)
      between the name and the setting, e.g. --source="'local'".
    • When setting a value to an option, always surround the value
      properly with double quotes bookending apostrophes, e.g.
      --source="'internal_server'".
    • If you are building PowerShell scripts, you can most likely just
      simply use apostrophes surrounding option values, e.g.
      --source='internal_server'.
    • Prefer upgrade to install in scripts. You can’t install to a newer
      version of something, but you can choco upgrade which will do both
      upgrade or install (unless switched off explicitly).
    • If you are sharing the script with others, pass --source to be
      explicit about where the package is coming from. Use full link and
      not source name (‘https://community.chocolatey.org/api/v2’ versus
      ‘chocolatey’).
    • If parsing output, you might want to use --limit-output/-r to
      get output in a more machine parseable format. NOTE: Not all
      commands handle return of information in an easily digestible
      output.
    • Use exit codes to determine status. Chocolatey exits with 0 when
      everything worked appropriately and other exits codes like 1 when
      things error. There are package specific exit codes that are
      recommended to be used and reboot indicating exit codes as well. To
      check exit code when using PowerShell, immediately call
      $exitCode = $LASTEXITCODE to get the value choco exited with.

    Here’s an example following bad practices (line breaks added for
    readability):

    choco install pkg1 -y -params '/Option:Value /Option2:value with spaces' --c4b-option 'Yaass' --option-that-is-new 'dude upgrade'

    Now here is that example written with best practices (again line
    breaks added for readability – there are not line continuations
    for choco):

    choco upgrade pkg1 -y --source="'https://community.chocolatey.org/api/v2'" --package-parameters="'/Option:Value /Option2:value with spaces'" --c4b-option="'Yaass'" --option-that-is-new="'dude upgrade'"

    Note the differences between the two:

    • Which is more self-documenting?
    • Which will allow for the newest version of something installed or
      upgraded to (which allows for more environmental consistency on
      packages and versions)?
    • Which may throw an error on a badly passed option?
    • Which will throw errors on unknown option values? See explanation
      below.

    Chocolatey ignores options it doesn’t understand, but it can only
    ignore option values if they are tied to the option with an
    equals sign (‘=’). Note those last two options in the examples above?
    If you roll off of a commercial edition or someone with older version
    attempts to run the badly crafted script --c4b-option 'Yaass' --option-that-is-new 'dude upgrade', they are likely to see errors on
    ‘Yaass’ and ‘dude upgrade’ because they are not explicitly tied to the
    option they are written after. Now compare that to the other script.
    Choco will ignore --c4b-option="'Yaass'" and
    --option-that-is-new="'dude upgrade'" as a whole when it doesn’t
    register the options. This means that your script doesn’t error.

    Following these scripting best practices will ensure your scripts work
    everywhere they are used and with newer versions of Chocolatey.

    Default Options and Switches

    -?, –help, -h
    Prints out the help menu.

    -d, –debug
    Debug – Show debug messaging.

    -v, –verbose
    Verbose – Show verbose messaging. Very verbose messaging, avoid using
    under normal circumstances.

    –trace
    Trace – Show trace messaging. Very, very verbose trace messaging. Avoid
    except when needing super low-level .NET Framework debugging. Available
    in 0.10.4+.

    –nocolor, –no-color
    No Color – Do not show colorization in logging output. This overrides
    the feature ‘logWithoutColor’, set to ‘False’. Available in 0.10.9+.

    –acceptlicense, –accept-license
    AcceptLicense – Accept license dialogs automatically. Reserved for
    future use.

    -y, –yes, –confirm
    Confirm all prompts – Chooses affirmative answer instead of prompting.
    Implies –accept-license

    -f, –force
    Force – force the behavior. Do not use force during normal operation –
    it subverts some of the smart behavior for commands.

    –noop, –whatif, –what-if
    NoOp / WhatIf – Don’t actually do anything.

    -r, –limitoutput, –limit-output
    LimitOutput – Limit the output to essential information

    –timeout, –execution-timeout=VALUE
    CommandExecutionTimeout (in seconds) – The time to allow a command to
    finish before timing out. Overrides the default execution timeout in the
    configuration of 2700 seconds. ‘0’ for infinite starting in 0.10.4.

    -c, –cache, –cachelocation, –cache-location=VALUE
    CacheLocation – Location for download cache, defaults to %TEMP% or value
    in chocolatey.config file.

    –allowunofficial, –allow-unofficial, –allowunofficialbuild, –allow-unofficial-build
    AllowUnofficialBuild – When not using the official build you must set
    this flag for choco to continue.

    –failstderr, –failonstderr, –fail-on-stderr, –fail-on-standard-error, –fail-on-error-output
    FailOnStandardError – Fail on standard error output (stderr), typically
    received when running external commands during install providers. This
    overrides the feature failOnStandardError.

    –use-system-powershell
    UseSystemPowerShell – Execute PowerShell using an external process
    instead of the built-in PowerShell host. Should only be used when
    internal host is failing. Available in 0.9.10+.

    –no-progress
    Do Not Show Progress – Do not show download progress percentages.
    Available in 0.10.4+.

    –proxy=VALUE
    Proxy Location – Explicit proxy location. Overrides the default proxy
    location of ”. Available for config settings in 0.9.9.9+, this CLI
    option available in 0.10.4+.

    –proxy-user=VALUE
    Proxy User Name – Explicit proxy user (optional). Requires explicit
    proxy (--proxy or config setting). Overrides the default proxy user of
    ”. Available for config settings in 0.9.9.9+, this CLI option available
    in 0.10.4+.

    –proxy-password=VALUE
    Proxy Password – Explicit proxy password (optional) to be used with
    username. Requires explicit proxy (--proxy or config setting) and user
    name. Overrides the default proxy password (encrypted in settings if
    set). Available for config settings in 0.9.9.9+, this CLI option
    available in 0.10.4+.

    –proxy-bypass-list=VALUE
    ProxyBypassList – Comma separated list of regex locations to bypass on
    proxy. Requires explicit proxy (--proxy or config setting). Overrides
    the default proxy bypass list of ”. Available in 0.10.4+.

    –proxy-bypass-on-local
    Proxy Bypass On Local – Bypass proxy for local connections. Requires
    explicit proxy (--proxy or config setting). Overrides the default
    proxy bypass on local setting of ‘True’. Available in 0.10.4+.

    –log-file=VALUE
    Log File to output to in addition to regular loggers. Available in 0.1-
    0.8+.

    –skipcompatibilitychecks, –skip-compatibility-checks
    SkipCompatibilityChecks – Prevent warnings being shown before and after
    command execution when a runtime compatibility problem is found between
    the version of Chocolatey and the Chocolatey Licensed Extension.
    Available in 1.1.0+

    Chocolatey v1.1.0
    PS C:\Users\user>


    PS > $env:Path -split ‘;’
    C:\Program Files\PowerShell\7
    C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin
    C:\WINDOWS\system32
    C:\WINDOWS
    C:\WINDOWS\System32\Wbem
    C:\WINDOWS\System32\WindowsPowerShell\v1.0\
    C:\WINDOWS\System32\OpenSSH\
    C:\Program Files\Microsoft SQL Server\130\Tools\Binn\
    C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
    C:\Program Files\Git\cmd
    C:\Program Files\dotnet\
    C:\WINDOWS\system32
    C:\WINDOWS
    C:\WINDOWS\System32\Wbem
    C:\WINDOWS\System32\WindowsPowerShell\v1.0\
    C:\WINDOWS\System32\OpenSSH\
    C:\Program Files\Microsoft SQL Server\150\Tools\Binn\
    C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\
    C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\
    C:\Program Files\Azure Data Studio\bin
    C:\PROGRA~1\JPKI
    D:\Program Files\nodejs\
    C:\Program Files\PowerShell\7\
    C:\ProgramData\chocolatey\bin
    C:\Users\user\AppData\Local\Microsoft\WindowsApps
    C:\Users\user\AppData\Local\Programs\Microsoft VS Code Insiders\bin
    C:\Users\user.dotnet\tools
    C:\Users\user\AppData\Roaming\npm


    Chocolatey Software | Installing Chocolatey

    PS > Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString(‘https://community.chocolatey.org/install.ps1‘))

    Forcing web requests to allow TLS v1.2 (Required for requests to Chocolatey.org)

    Getting latest version of the Chocolatey package for download.

    Not using proxy.

    Getting Chocolatey from https://community.chocolatey.org/api/v2/package/chocolatey/1.1.0.

    Downloading https://community.chocolatey.org/api/v2/package/chocolatey/1.1.0 to C:\Users\user\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip

    Not using proxy.

    Extracting C:\Users\user\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip to C:\Users\user\AppData\Local\Temp\chocolatey\chocoInstall

    Installing Chocolatey on the local machine

    Creating ChocolateyInstall as an environment variable (targeting ‘Machine’)

      Setting ChocolateyInstall to ‘C:\ProgramData\chocolatey’

    WARNING: It’s very likely you will need to close and reopen your shell  before you can use choco.

    WARNING: Not able to set permissions for C:\ProgramData\chocolatey.

    We are setting up the Chocolatey package repository.

    The packages themselves go to ‘C:\ProgramData\chocolatey\lib’

      (i.e. C:\ProgramData\chocolatey\lib\yourPackageName).

    A shim file for the command line goes to ‘C:\ProgramData\chocolatey\bin’

      and points to an executable in ‘C:\ProgramData\chocolatey\lib\yourPackageName’.

    Creating Chocolatey folders if they do not already exist.

    WARNING: You can safely ignore errors related to missing log files when

      upgrading from a version of Chocolatey less than 0.9.9.

      ‘Batch file could not be found’ is also safe to ignore.

      ‘The system cannot find the file specified’ – also safe.

    chocolatey.nupkg file not installed in lib.

    Attempting to locate it from bootstrapper.

    PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Adding

    WARNING: Not setting tab completion: Profile file does not exist at ‘C:\Users\user\Documents\PowerShell\Microsoft.PowerShell_profile.ps1’.

    Chocolatey (choco.exe) is now ready.

    You can call choco from anywhere, command line or powershell by typing choco.

    Run choco /? for a list of functions.

    You may need to shut down and restart powershell and/or consoles

    first prior to using choco.

    Ensuring Chocolatey commands are on the path

    Ensuring chocolatey.nupkg is in the lib folder

    PS >


    1,253 View Count