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

How can I get requirements.txt to work for Google App Engine?

It appears the current versions of google-cloud-logging and google-cloud-storage are incompatible. How on earth does Google think it's okay to have a "platform" where you can't use the latest versions of things together? If my requirements.txt…
2
votes
0 answers

How to include gtk+ 4 as a dependency in python package setup file?

Background I have used GTK+4 framework for a UI (my first time with GTK). While developing, I had installed the framework (GObject, etc) on my Fedora using the dnf package manager, as instructed. Problem How do I include GTK+ 4 (imported as Gtk…
2
votes
0 answers

Python virtual environment, requirements installation, ignore pinned versions

When I install all the requirements from a foreign requirements.txt file containing outdated pinned versions it frequently ends up in some trouble caused by incompatibilities introduced in later python versions. Therefore I'm searching for a way to…
2
votes
1 answer

requirements.txt for pytorch for both CPU and GPU platforms

I am trying to create a requirements.txt to use pytorch but would like it to work on both GPU and non-GPU platforms. I do something like on my Linux GPU system: --find-links…
Luca
  • 10,458
  • 24
  • 107
  • 234
2
votes
1 answer

Pip install with requirements.txt from private repo prompting for password

I am trying to install a python package my_package from a private Github repo using pip. I am using Github oauth tokens (aka personal access tokens) for security. My token is stored in the environment variable $API_TOKEN. From the console if I…
John F
  • 994
  • 10
  • 26
2
votes
0 answers

Install specific release and tag of github repo using requirements.txt

I want to use requirements.txt to install this specific github package in my project: https://github.com/explosion/spacy-models/releases/tag/en_core_web_sm-3.2.0 but am not sure how to do it. I have…
Theory94
  • 149
  • 1
  • 3
  • 12
2
votes
1 answer

Same code does not work in venv despite installing dependencies from same requirements.txt

I am developing a web application and trying to migrate from Spyder to VS Code. It was working with the default interpreter, so I created a new venv but when I start the server it does not work with the same code that was working without the…
Shuja
  • 23
  • 3
2
votes
0 answers

Pipreqs missing optional dependency package requirement

Most of the time, I use pipreqs to generate a requirements.txt file so anyone can reproduce the working environment on their side based on that requirements file. Here I am facing a case where there is a missing package requirement in the file…
SBD
  • 41
  • 1
  • 8
2
votes
1 answer

Elastic Beanstalk Django app deployment 502 Bad Gateway Server not running (No module named: 'application')

I deployed an application to AWS via Elastic Beanstalk, and when I finished pushing the project to aws (Elastic Beanstalk), I am faced with perpetual 502 Bad Gateway errors (probably because the Django app server never actually started, and Nginx…
2
votes
1 answer

Setting up requirements.txt in prebuild gitpod.yml

Whenever I open my gitpod workspace I have to re-install my requirements.txt file. I was reading about the gitpod.yml file and see that I have to add it in there so the dependencies get installed during the prebuild. I can't find any examples of…
Ryan Thomas
  • 488
  • 4
  • 14
2
votes
0 answers

Specify -f option in pip3 requirements.txt

I used to install PyTorch with the command: pip3 install torch==1.7.1+cu110 torchvision==0.8.2+cu110 -f https://download.pytorch.org/whl/torch_stable.html I want to save the requirements into a requirements.txt file. How can I include the -f…
user1315621
  • 3,044
  • 9
  • 42
  • 86
2
votes
2 answers

Pip freeze shows a weird version of a package

So I was creating the requirements.txt file by using the command : pip list --format=freeze > requirements.txt and one of the packages had this as a version : setuptools==52.0.0.post20210125 Why is this so? And will this give an error when I deploy…
2
votes
2 answers

How do I remove unwanted paths in requirements.txt?

I currently have a requirements file generated with pip3 as follows: pip3 freeze > requirements.txt With the above command I get the following requirements.txt file: alabaster @…
2
votes
1 answer

Not able to install r- requirements.txt

I'm pretty new to python. I am currently trying to install the requirements.txt from a program, someone wrote, because I'm interested in how it works. So, the requirements are: pygame==2.0.0.dev10 scipy==1.4.1 Whenever I try to install them, the…
2
votes
3 answers

Is there a way to automatically add dependencies to requirements.txt as they are installed?

Similar to how Node.js automatically adds dependencies to package-lock.json, is there a way I can automatically add requirements to my requirements.txt file for Python?
Revircs
  • 1,312
  • 3
  • 12
  • 23