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
3
votes
1 answer

Pipreqs not including all packages?

I currently have a conda environment tf_gpu and I pip installed pipreqs in it to auto generate requirements.txt Now, in my project folder, I have app.py with the imports : import os from dotenv import load_dotenv from flask import Flask,…
Techie5879
  • 516
  • 1
  • 5
  • 13
3
votes
1 answer

Reusable GitHub action workflow with actions/setup-python fails because it can't find requirements.txt

GitHub repository A contains a reusable GitHub action workflow where myscript is a bash script wrapper around a python dependency: name: 'A' [...] runs: using: 'composite' steps: - uses: actions/setup-python@v4 with: …
Konrad Höffner
  • 11,100
  • 16
  • 60
  • 118
3
votes
1 answer

No matching distribution found for torch==1.9.0+cu111

I am trying to install Codegen in my machine. At the time of installing using virtualenv, I am getting the following error: pip3 install -r requirements.txt Looking in links: https://download.pytorch.org/whl/torch_stable.html ERROR: Could not find a…
Exploring
  • 2,493
  • 11
  • 56
  • 97
3
votes
1 answer

Poetry add dependecy from requirements.text fails NoSuchOptionException The "-r" option does not exist

I want to add poetry to the existing project to add a dependency from requirements.txt I ran the following command poetry add $( cat requirements.txt ) In either case, I get the same error - shown below .venv) bash-3.2$ poetry add $( cat…
3
votes
1 answer

"SyntaxError: invalid character" when using pipreqs to generate requirements.txt

Stack Trace: (realestate_env) PS C:\Users\Jun\Desktop\Jupyter Projects\Real Estate Price Prediction> pipreqs ERROR: Failed on file: C:\Users\Jun\Desktop\Jupyter Projects\Real Estate Price…
林抿均
  • 33
  • 7
3
votes
1 answer

Can't deploy streamlit app on share.streamlit.io

I am working with a simple ML model with streamlit. It runs fine on my local machine inside conda environment, but it shows Error installing requirements when I try to deploy it on share.streamlit.io. The error message is the following: ERROR: Could…
nabin47
  • 35
  • 1
  • 5
3
votes
0 answers

ERROR: Failed building wheel for dependency-injector, ERROR: Failed building wheel for pyduktape

Failed to get both dependency injector and pyduktape in Django project requirements.txt. It asked to install Visual C++ 14.0 or greater but it is already there. requirements.txt containts dependency-injector==3.15.6 and pyduktape==0.0.6 Tried with…
3
votes
1 answer

How to auto update requirements.txt when a new/updated package is installed

How would I go about auto updating the requirements.txt file for when I install/update a package? My main idea would be when I push an update to git it would auto create the requirements.txt file (or something along those lines). I understand there…
mike_gundy123
  • 469
  • 5
  • 18
3
votes
1 answer

PsyNet experiment throws error related to requirements.txt

When running psynet debug, I see this error relating to requirements.txt: During handling of the above exception, another exception occurred: Traceback (most recent call last): File…
Peter Harrison
  • 873
  • 1
  • 8
  • 12
3
votes
2 answers

Error while Installing Packages from requirements.txt in python 3.9

when i run pip install -r requirements.txt i get ERROR: Could not find a version that satisfies the requirement cffi==1.14.0 (from versions: 0.1, 0.2, 0.2.1, 0.3, 0.4, 0.4.1, 0.4.2, 0.5, 0.6, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.8.2, 0.8.3, 0.8.4,…
Mohammad Farseen
  • 75
  • 1
  • 2
  • 8
3
votes
1 answer

Error encountered while installing dependencies for flask-mysql application using requirements.txt file in AWS Elastic Beanstalk

I am trying to deploying a flask application which uses mysqlclient module. I added "mysqlclient==2.0.3" in the requirements.txt file but it is giving me an error as mentioned: Hoping to get a solution in order to resolve this and deploy my…
3
votes
2 answers

Why use requirements.txt in a Docker image

There is a similar question from last year but I don't think the responses are widely applicable and it's not accepted. This is in the context of developing small jobs that will only be run in Docker in-house; I'm not talking about sharing work with…
Levin Magruder
  • 1,905
  • 18
  • 26
3
votes
1 answer

Difference "pip wheel" and "pip download"?

I'm trying to figure out what's the difference between these two python commands: pip wheel --wheel-dir=some_dir -r requirement.txt and pip download -d some_dir -r requirement.txt At first I thought "pip download" by default downloads the…
hotwired
  • 31
  • 1
  • 4
3
votes
1 answer

Can pip dependencies exclude or include in semantic pre-release labels?

I have developers that want to be able to publish a library as a "beta" or "release" version. i.e.: 1.2.3-beta 1.2.3 On the consuming project, they couldn't give me any specific criteria of when they would want to use a beta or release package. We…
user3066571
  • 1,381
  • 4
  • 14
  • 37
3
votes
1 answer

requirements.txt: conditional on python version

My requirements.txt has got dataclasses in it, to backport for python 3.6 However, some build machines and coworkers use python 3.7, which fails when it attempts to install this module. Is there a way to make dataclasses only installed if it is…
Daniel Paczuski Bak
  • 3,720
  • 8
  • 32
  • 78