requirements.txt

pip freeze creates some weird path instead of the package version

pip freeze creates some weird path instead of the package version Question: I am working on developing a python package. I use pip freeze > requirements.txt to add the required package into the requirement.txt file. However, I realized that some of the packages, instead of the package version, have some path in front of them. …

Total answers: 2

How to include git branch in installing from requirements in Python?

How to include git branch in installing from requirements in Python? Question: Hi I need to install from a branch of a git repo. I want to include it on the requirements.txt so that it would install using the command pip install -r requirements.txt What I know is how to install from master branch (See …

Total answers: 1

Install PyTorch from requirements.txt

Install PyTorch from requirements.txt Question: Torch documentation says use pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html to install the latest version of PyTorch. This works when I do it manually but when I add it to req.txt and do pip install -r req.txt, it fails and says ERROR: No matching distribution. Edit: adding the whole line …

Total answers: 5

Does Python requirements file have to specify version?

Does Python requirements file have to specify version? Question: I have a requirements.txt file for a Python code base. The file has everything specified: pytz==2017.2 requests==2.18.4 six==1.11.0 I am adding a new package. Should I list its version? If yes, how do I pick a version to specify? Asked By: Intrastellar Explorer || Source Answers: …

Total answers: 3

List only outdated pip packages mentioned in requirements file

List only outdated pip packages mentioned in requirements file Question: I can use pip list -o to get a list of outdated packages but I would like to only get a list of outdated packages which are listed in a particular requirements file. Basically the equivalent of pip freeze -r requirements.txt for outdated packages. I …

Total answers: 3

Equivalent of `package.json' and `package-lock.json` for `pip`

Equivalent of `package.json' and `package-lock.json` for `pip` Question: Package managers for JavaScript like npm and yarn use a package.json to specify ‘top-level’ dependencies, and create a lock-file to keep track of the specific versions of all packages (i.e. top-level and sub-level dependencies) that are installed as a result. In addition, the package.json allows us to …

Total answers: 2

Requirements.txt greater than equal to and then less than?

Requirements.txt greater than equal to and then less than? Question: I have this line in my requirements file django>=1.10,<1.11 Does that mean I need to have Django version >= 1.10 and then less than 1.11? Asked By: Chris || Source Answers: Yes. The pip manualĀ [doc] has a section on the format of "requirement specifiers". These …

Total answers: 1

requirements.txt vs setup.py

requirements.txt vs setup.py Question: I started working with Python. I’ve added requirements.txt and setup.py to my project. But, I am still confused about the purpose of both files. I have read that setup.py is designed for redistributable things and that requirements.txt is designed for non-redistributable things. But I am not certain this is accurate. How …

Total answers: 4

Unable to install using pip install requirements.txt

Unable to install using pip install requirements.txt Question: I’m trying to install BitTornado for Python 2.7 using requirements.txt, I get the following error: Collecting requirements.txt Could not find a version that satisfies the requirement requirements.txt (from versions: ) No matching distribution found for requirements.txt Here is my code in requirements.txt: -e git+https://github.com/effigies/BitTornado.git#egg=python2.7 I also tried …

Total answers: 2

How to use requirements.txt to install all dependencies in a python project

How to use requirements.txt to install all dependencies in a python project Question: I am new to python. Recently I got a project written by python and it requires some installation. I run below command to install but got an error. # pip install requirements.txt Collecting requirements.txt Could not find a version that satisfies the …

Total answers: 7