Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip -U -r requirements.txt with a URL keeps reinstalling

Tags:

python

pip

django

I'm using a beta version of Django which the download page suggests to use a URL.

The requirements.txt entry is simply the URL:

https://www.djangoproject.com/download/1.7b3/tarball/

When I run pip install -U -r requirements.txt it always reinstalls Django. Is there a way to specify the version in the requirements.txt line, e.g. ...tarball/#egg=Django==1.7b3?

I prefer to be at the latest version of each package when developing, so I use -U.

Maybe there is a better way around this?

like image 991
gak Avatar asked May 01 '14 04:05

gak


People also ask

How do you use a requirements TXT file with pip?

The most common command is pip freeze > requirements. txt , which records an environment's current package list into requirements. txt. If you want to install the dependencies in a virtual environment, create and activate that environment first, then use the Install from requirements.

What is pip default index URL?

Base URL of the Python Package Index (default https://pypi.org/simple).

Does pip install dependencies automatically?

Pip is able to install packages configured with their dependencies, because most authors package their code as wheels by default before submitting to PyPI. For example, the Twine package and its dependencies are provided in a Wheel named 'twine-3.1. 1-py3-none-any. whl' located in https://pypi.org/project/twine.


1 Answers

You should try adding one of these lines into your requirements.txt

-e https://github.com/django/django.git#egg=django

Also point to specific commit

-e https://github.com/django/django.git@b8d255071ead897cf68120cd2fae7c91326ca2cc#egg=django

or tag

-e git+https://github.com/django/[email protected]

Read the pip's documentation there's a lot of other examples

like image 172
Edson Dota Avatar answered Dec 06 '22 10:12

Edson Dota