Questions tagged [requirements.txt]

requirements.txt is the standard name for a requirements file for Python package installation program `pip`. It's used in the command like `pip install -r requirements.txt`.

requirements.txt is the standard name for a requirements file for Python package installation program pip. The file is list of items to be installed like so:

pip install -r requirements.txt

The items in the file can be package names (will be installed from Python Package Index or any other index configured in ~/.pypirc), package files or URLs to VCS.

For more information on requirements files see pip user guide.

635 questions
-1
votes
2 answers

Forcing Flask to only use libraries contained in requirements.txt?

I have a Flask app currently running on Google App Engine. Locally, the app is running inside a virtual environment and references the appropriate libraries installed in the venv/Lib/site-packages directory. When the app is updated in GAE,…
Jack Scott
  • 358
  • 1
  • 4
  • 13
-1
votes
1 answer

My requirments.txt file doesn't have list of all library I have used in project

I have create a new conda env. Then after complete the project, I have generated pickle file. Now when I am trying to generated requirements.txt it is not giving me list of all library or packages (carprediction) F:\Car Dekho Dataset>pip3 freeze >…
-1
votes
1 answer

ERROR: Could not find a version that satisfies the requirement json==1.0.0

I am trying to host my discord bot (coded in Python) on Heroku, but I am facing this error. How do I correctly include the json package in requirements.txt? bot.py file from discord.ext import commands import json def get_prefix(client, message): …
-1
votes
1 answer

what is the purpose of setup.py?

I have created setup.py for my project. Attached below. "-e" run setup.py file. May I write "-r requirements.txt" at the end so that I might create env including my requirements along with dependencies? name: mypro dependencies: - python==3.7 …
-1
votes
1 answer

Read contents of a flat file and go through validation process

I am trying to automate a process where a particular type of text file goes through a data validation process. So far I have managed to put the open the text file using file system objects and create a count output of x lines. But when i use EOF…
-1
votes
2 answers

How to specify dependencies in Python

I came across a python library which has docs, which start like this: Quickstart Include foolib in your requirements.txt file. AFAIK dependencies should be specified via install_requires in setup.py. Should I talk the maintainer of the library and…
guettli
  • 25,042
  • 81
  • 346
  • 663
-1
votes
1 answer

Django fails in server

I fail to see what is happening. I put the output of git push heroku master for analysis. When I do pip freeze > requirements.txt, it produces a very large file and I do not know if that's normal. The app locally and in development mode works…
Chus
  • 57
  • 4
-1
votes
1 answer

virtual environment requirements.txt

I would like to put a requirements.txt file in my virtual environment. The two ways I have thought about are making a txt file and then moving it to the correct directory (I do not know how to find the directory: when I type workon, the…
and1can
  • 79
  • 1
  • 9
-2
votes
1 answer

Update requirements.txt without installing packages

I have a requirements.txt with dependencies pinned using ==. The pinning using == is a requirement to ensure reproducibility. I'd like to update all of them to the most recent version. I do not want to install any of them, I only want to modify…
Philippe
  • 1,715
  • 4
  • 25
  • 49
-2
votes
1 answer

Creating a requirements.txt for python 3.11.3

I have a python 3.7.6. Heroku only allows python-3.9.16 , python-3.10.11 , and python-3.11.3 . How can I create a requirements.txt without updating my python version? I need the compatible versions…
-2
votes
2 answers

Install dependencies via pip -r requirements.txt

I want to install this library: https://github.com/stefanfoulis/django-phonenumber-field I have done like this: (venv) michael@michael:~/PycharmProjects/client$ pip install django-phonenumber-field[phonenumbers] Requirement already satisfied:…
Kifsif
  • 3,477
  • 10
  • 36
  • 45
-2
votes
2 answers

How to install all requirements in requirements.txt EXCEPT a few

quick question - I have a big requirements file. On one system, I have a couple requirements (pytorch, torchvision) which don't install on the a particular machine. Is there a way I can still use the file to install everything BUT these? …
Peter
  • 12,274
  • 9
  • 71
  • 86
-2
votes
2 answers

Install fails with requirements.txt but works with pip install

I'm seeing some weird behavior when using requirements.txt vs. when installing directly with pip. Hoping you can shed some light on this. This may be the same as this unanswered question: pip install -r requirements.txt fails on scipy, but works…
cjav_dev
  • 2,895
  • 19
  • 25
-3
votes
1 answer

Docker can't find requirements.txt even though it is present in the same folder as the dockerfile and there is no typo

I have a docker file and I am trying to build the image but it can't find requirements.txt: Project struture, docker file and cmd Here are the contents of dockerfile: FROM python:3.9 WORKDIR /app COPY requirements.txt ./ RUN pip install…
-3
votes
1 answer

I try to install python package (collections) by using this command (sudo pip install collections) but these errors appear i want the solution?

but i got this errors i want the solution (ERROR: Could not find a version that satisfies the requirement collections (from versions: none) ERROR: No matching distribution found for collections) i do this command (sudo pip install collections) but…
1 2 3
42
43