LoginSignup
10
5

More than 3 years have passed since last update.

branch/tag を指定して GitHub から pip install

Last updated at Posted at 2018-03-15

コマンド

pip install 時に @ に続けて ブランチ or タグ を指定。

$ pip install git+{Clone URL}@{branch/tag}

Django 各バージョンの安定版

事情があって Django 1.3 を利用し続けるを得ない環境に身を置いていました。

PyPI から 1.3.7 をインストールすると static/media 周りでうまく動かなかったのですが、 GitHub から安定版をインストールすることで問題なく動作させられました。

Django リポジトリでは、 stable/バージョン というブランチがあり、各バージョンの安定版 HEAD を参照しています。

$ pip install git+https://github.com/django/django.git@stable/1.3.x
Collecting git+https://github.com/django/django.git@stable/1.3.x
  Cloning https://github.com/django/django.git (to stable/1.3.x) to /tmp/pip-T_6pib-build
Installing collected packages: Django
  Running setup.py install for Django ... done
Successfully installed Django-1.3.8-pre-alpha

Django-1.3.8-pre-alpha というバージョン表記です。 https://github.com/django/django/blob/stable/1.3.x/django/__init__.py

10
5
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
10
5