requirements.txt

In requirements.txt, what does tilde equals (~=) mean?

In requirements.txt, what does tilde equals (~=) mean? Question: In the requirements.txt for a Python library I am using, one of the requirements is specified like: mock-django~=0.6.10 What does ~= mean? Asked By: James Hiew || Source Answers: It means it will select the latest version of the package, greater than or equal to 0.6.10, …

Total answers: 6

Could not find a version that satisfies the requirement <package>

Could not find a version that satisfies the requirement <package> Question: I’m installing several Python packages in Ubuntu 12.04 using the following requirements.txt file: numpy>=1.8.2,<2.0.0 matplotlib>=1.3.1,<2.0.0 scipy>=0.14.0,<1.0.0 astroML>=0.2,<1.0 scikit-learn>=0.14.1,<1.0.0 rpy2>=2.4.3,<3.0.0 and these two commands: $ pip install –download=/tmp -r requirements.txt $ pip install –user –no-index –find-links=/tmp -r requirements.txt (the first one downloads the packages and …

Total answers: 18

Automatically create requirements.txt

Automatically create requirements.txt Question: Sometimes I download the python source code from github and don’t know how to install all the dependencies. If there is no requirements.txt file I have to create it by hands. The question is: Given the python source code directory is it possible to create requirements.txt automatically from the import section? …

Total answers: 26

How to create a requirements.txt?

How to create a requirements.txt? Question: I’m wondering how I can create a suitable requirements.txt for my Python 3 application? Asked By: Daniel Santos || Source Answers: type following line in your command prompt pip freeze > requirements.txt Answered By: Pawan if you aren’t in virtualenv and don’t feel like putting all your installed packages …

Total answers: 3

Upgrade python packages from requirements.txt using pip command

Upgrade python packages from requirements.txt using pip command Question: How do I upgrade all my python packages from requirements.txt file using pip command? tried with below command $ pip install –upgrade -r requirements.txt Since, the python packages are suffixed with the version number (Django==1.5.1) they don’t seem to upgrade. Is there any better approach than …

Total answers: 16

Check if requirements are up to date

Check if requirements are up to date Question: I’m using pip requirements files for keeping my dependency list. I also try to follow best practices for managing dependencies and provide precise package versions inside the requirements file. For example: Django==1.5.1 lxml==3.0 The question is: Is there a way to tell that there are any newer …

Total answers: 4

Travis special requirements for each python version

Travis special requirements for each python version Question: I need unittest2 and importlib for python 2.6 that is not required for other python versions that travis tests against. Is there a way to tell Travis-CI to have different requirements.txt files for each python version? Asked By: fakedrake || Source Answers: Travis CI adds an environment …

Total answers: 2

Is there any way to show the dependency trees for pip packages?

Is there any way to show the dependency trees for pip packages? Question: I have a project with multiple package dependencies, the main requirements being listed in requirements.txt. When I call pip freeze it prints the currently installed packages as plain list. I would prefer to also get their dependency relationships, something like this: Flask==0.9 …

Total answers: 4

How to state in requirements.txt a direct github source

How to state in requirements.txt a direct github source Question: I’ve installed a library using the command pip install git+git://github.com/mozilla/elasticutils.git which installs it directly from a Github repository. This works fine and I want to have that dependency in my requirements.txt. I’ve looked at other tickets like this but that didn’t solve my problem. If …

Total answers: 10

Check if my Python has all required packages

Check if my Python has all required packages Question: I have a requirements.txt file with a list of packages that are required for my virtual environment. Is it possible to find out whether all the packages mentioned in the file are present. If some packages are missing, how to find out which are the missing …

Total answers: 8