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
4
votes
2 answers

How to install newest library version in Google Cloud Functions from requirements.txt

When a cloud function is deployed I assume Google performs some equivalent of: pip install -r requirements.txt Let's say the requirements.txt file contains: google-cloud-pubsub google-cloud-storage==1.26.0 Since the cloud storage version is…
4
votes
3 answers

How can I audit and minimize requirements.txt?

I looking for a way to audit and minimize requirements.txt. I've taken over a project that has grown bloated over several iterations, and I'm trying to make it more maintainable. The current virtual environment I'm in was created from the previous…
4
votes
3 answers

Heroku not reading requirement.txt file

I am trying to deploy my python flask app to heroku but it keeps crashing and complaining about bash: gunicorn: command not found. I have my requirement.txt file in the root folder where my Procfile is also located. My python code is located in…
charles okojie
  • 708
  • 2
  • 10
  • 23
4
votes
1 answer

How to configure pip to use editable installs to fulfill requirements

I'm trying to write a script that uses mkvirtualenv to re-make a virtual environment from the requirements recorded earlier with pip freeze > . The original environment includes some editable installs (setuptools develop mode installs)…
maf
  • 305
  • 1
  • 9
4
votes
1 answer

How can I get readthedocs.org build to ignore my requirement.txt?

I have a small app project on github which runs on Windows and requires pythonnet. My requirement.txt contains: beautifulsoup4==4.6 pythonnet==2.3 Now I thought I would build a documentation for it and put it on readthedocs.org. After pushing my…
Jacques Gaudin
  • 15,779
  • 10
  • 54
  • 75
4
votes
2 answers

How to update Python Standard Library packages with pip?

I am creating a requirements.txt file for my Python project. When someone installs my project via pip; I want pip to also download the Tkinter and time Python modules, both of which are modules in the Python Standard Library. I used the command pip…
William V.
  • 515
  • 5
  • 24
4
votes
3 answers

Why does `pip freeze` result in an empty file?

I'm following the tutorial to deploy Django applications on Heroku. In the 5th line of the code, it says pip freeze > requirements.txt but when I run it (from the venv), the requirements.txt file is empty! It produced 6-7 dependencies with the same…
jeff
  • 13,055
  • 29
  • 78
  • 136
4
votes
0 answers

adding --extra-index-url to setup.py setup_requires

I'm building a package with some internal dependency from a local artifactory. requirements.txt --extra-index-url http://someurl/ some_internal_package setup.py .... install_reqs = parse_requirements('requirements.txt', session=PipSession()) reqs =…
Kobi K
  • 7,743
  • 6
  • 42
  • 86
4
votes
1 answer

Do I always need to rebuild docker in order to install new pip packages?

I noticed when I try to use docker ( Fig mainly ) to install a new pip package, it does not actually maintain on the system. I must rebuild and install the pip package from requirements.txt I tried running fig run web pip install django and I see…
Kevin Postal
  • 349
  • 3
  • 14
4
votes
0 answers

pip install package from requirements fails, "uses insecure transport scheme"

I'm trying to install django-forms-builder via an entry in the requirements.txt file. When running pip install -r requirements.txt I receive the error django-forms-builder/0.11.1 uses an insecure transport scheme (http). Consider using https if …
Whelt
  • 149
  • 7
4
votes
1 answer

What is the equivalent of twiddle-wakka (~>) from ruby's gem in requirements.txt for python's pip?

I've seen the twiddle-wakka operator (~>) used in ruby's gem file (documentation) to specify the last point version compatible like this: '~> 0.3.1' is satisfied by 0.3.1, 0.3.2, 0.3.3, etc. '~> 0.3.1' is not satisfied by 0.3.0 '~> 0.3' is satisfied…
Nitrodist
  • 1,585
  • 5
  • 24
  • 34
4
votes
2 answers

What's the difference between direct pip install and the requirements.txt?

I'm confused. I've got a working pip install command (meaning: it installs a version of a library from Github which works for me), and I have a non-working (meaning: it installs a version of a library which does not work for me) way of putting that…
Alfe
  • 56,346
  • 20
  • 107
  • 159
4
votes
2 answers

python pip not working on requirements.txt after OS X 10.8 macports install

Recently bought a new Mac and was setting it up for both Python and iOS development. Python was working fine--especially pip'ing git repos with lots of requirements.txt dependencies UNTIL I installed Xcode, macports and Apple's command line…
user1924333
  • 41
  • 1
  • 2
3
votes
2 answers

What should GitHub repo package folder of a Python project include to manage dependencies?

I have a question that I cannot seem to find the right answer for (perhaps I am articulating it incorrectly). My program is dependent on Numpy and datetime. should I include those inside the modules folder? Or is it assumed that some of the…
rivesalex
  • 31
  • 2
3
votes
1 answer

Installing requirements.txt in a venv inside VSCode

Apart from typing out commands - is there a good way to install requirements.txt inside VSCode. I have a workspace with 2 folders containing different Python projects added - each has it's own virtual environment. I would like to run a task to…