mac に pip をインストールする
2017-05-26 09:00
  • mac な人はだいたい homebrew を使って必要なコマンド等を入れると思うのですが、
    ちょっと試してみたい python ライブラリがあったので pip を入れてみたときのメモ。

    Python のバージョンを確認する

    まず、 Python のバージョンを確認します。
    $ python -V
    Python 2.7.10
    

    easy_install で pip を入れる

    $ sudo easy_install pip
    Password:
    Searching for pip
    Reading https://pypi.python.org/simple/pip/
    Best match: pip 9.0.1
    Downloading https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9
    Processing pip-9.0.1.tar.gz
    Writing /tmp/easy_install-SyHXeE/pip-9.0.1/setup.cfg
    Running pip-9.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-SyHXeE/pip-9.0.1/egg-dist-tmp-mMQRu2
    /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
      warnings.warn(msg)
    warning: no previously-included files found matching '.coveragerc'
    warning: no previously-included files found matching '.mailmap'
    warning: no previously-included files found matching '.travis.yml'
    warning: no previously-included files found matching '.landscape.yml'
    warning: no previously-included files found matching 'pip/_vendor/Makefile'
    warning: no previously-included files found matching 'tox.ini'
    warning: no previously-included files found matching 'dev-requirements.txt'
    warning: no previously-included files found matching 'appveyor.yml'
    no previously-included directories found matching '.github'
    no previously-included directories found matching '.travis'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'contrib'
    no previously-included directories found matching 'tasks'
    no previously-included directories found matching 'tests'
    Adding pip 9.0.1 to easy-install.pth file
    Installing pip script to /usr/local/bin
    Installing pip2.7 script to /usr/local/bin
    Installing pip2 script to /usr/local/bin
    
    Installed /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg
    Processing dependencies for pip
    Finished processing dependencies for pip
    

    $ pip
    
    Usage:   
      pip <command> [options]
    
    Commands:
      install                     Install packages.
      download                    Download packages.
      uninstall                   Uninstall packages.
      freeze                      Output installed packages in requirements format.
      list                        List installed packages.
      show                        Show information about installed packages.
      check                       Verify installed packages have compatible dependencies.
      search                      Search PyPI for packages.
      wheel                       Build wheels from your requirements.
      hash                        Compute hashes of package archives.
      completion                  A helper command used for command completion.
      help                        Show help for commands.
    
    General Options:
      -h, --help                  Show help.
      --isolated                  Run pip in an isolated mode, ignoring environment variables and user configuration.
      -v, --verbose               Give more output. Option is additive, and can be used up to 3 times.
      -V, --version               Show version and exit.
      -q, --quiet                 Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).
      --log <path>                Path to a verbose appending log.
      --proxy <proxy>             Specify a proxy in the form [user:passwd@]proxy.server:port.
      --retries <retries>         Maximum number of retries each connection should attempt (default 5 times).
      --timeout <sec>             Set the socket timeout (default 15 seconds).
      --exists-action <action>    Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
      --trusted-host <hostname>   Mark this host as trusted, even though it does not have valid or any HTTPS.
      --cert <path>               Path to alternate CA bundle.
      --client-cert <path>        Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.
      --cache-dir <dir>           Store the cache data in <dir>.
      --no-cache-dir              Disable the cache.
      --disable-pip-version-check
                                  Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.
    

    インストールできたっぽい。

    人気ブログランキングへ ブログランキング・にほんブログ村へ
    ↑応援よろしくお願いします!m(_ _)m

  • 2017-05-26 09:00
  • Python
  • Pythonpipパッケージ2.7homebrewbrewmac
  • 新しい記事へ
    Hulu (happyon.jp) の動画プレイヤーのサイズを変更する拡張作ったった

    古い記事へ
    サイトを SSL 化したときに行ったこと

profile picture

自己紹介的な何か

@wkmettyでついったーやってます。時々。 6年間勤めたゲーム会社を2018年2月に退職しフリーランスのプログラマに。 WordPress コントリビューター。 お仕事募集中です。