Installing PyPI packages

The basic way to install a package from binstar is using pip:

pip install --index-url pypi.binstar.org/REGISTRY-PATH/simple PACKAGE

Where REGISTRY-PATH may be one of the following:

  1. A username, this allows installation of packages from a user registry: pip install --index-url pypi.binstar.org/USER/simple PACKAGE

    Note:
    the pypi user contains a full up to date mirror of pypi.python.org
    e.g. pypi.binstar.org/pypi

  2. A user channel, this allows installation of packages from a collection of packages a user has put together: pip install --index-url pypi.binstar.org/USER/channel/channel-NAME/simple PACKAGE

    The main channel is the default channel: pypi.binstar.org/USER/channel/main/simple is equivalent to pypi.binstar.org/USER/simple

Installing Private Packages

All urls (except for the public registry) can be prefixed with /t/$TOKEN to access private packages.

TOKEN=$(binstar auth --create --name YOUR-TOKEN-NAME)
pip install --index-url pypi.binstar.org/t/$TOKEN/USER/simple PACKAGE

Modify your piprc file

pip allows you to set all command line option defaults in a standard ini style config file.

The names and locations of the configuration files vary slightly across platforms.

  • On Unix and Mac OS X the configuration file is: $HOME/.pip/pip.conf
  • On Windows, the configuration file is: %HOME%\pip\pip.ini

Appending options like --extra-index-url or --index-url can be written as:

[global]
extra-index-url =
    http://pypi.binstar.org/user/simple

[install]
extra-index-url =
    http://pypi.binstar.org/user2/simple

See also the official pip installer documentation

Authoring PyPI packages

All packages you author must go to a user account. To create a package go to binstar.org/new

See also authoring packages for a general overview.

::...
免责声明:
当前网页内容, 由 大妈 ZoomQuiet 使用工具: ScrapBook :: Firefox Extension 人工从互联网中收集并分享;
内容版权归原作者所有;
本人对内容的有效性/合法性不承担任何强制性责任.
若有不妥, 欢迎评注提醒:

或是邮件反馈可也:
askdama[AT]googlegroups.com


订阅 substack 体验古早写作:


点击注册~> 获得 100$ 体验券: DigitalOcean Referral Badge

关注公众号, 持续获得相关各种嗯哼:
zoomquiet


自怼圈/年度番新

DU22.4
关于 ~ DebugUself with DAMA ;-)
粤ICP备18025058号-1
公安备案号: 44049002000656 ...::