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

How to install certain packages before building wheels for other packages in requirements.txt using pip?

Here is a section of my requirements.txt file. pystan cython lunardate holidays convertdate plotly fbprophet While using pip install, all the packages are downloaded, built and installed in the same order as expected. However, for building the…
Sayan Sil
  • 5,799
  • 3
  • 17
  • 32
3
votes
1 answer

Pip install requirements.txt in venv: How to ignore system site packages of different version?

I am in a virtual environment which shares the system site packages (created with venv in Python 3.5), and I would like to install all packages in a given requirements.txt into this venv. The system-wide python installation is read-only, so I cannot…
Da Jogh
  • 61
  • 4
3
votes
2 answers

Why use pip install requirements.txt instead of pip install ./?

I'm not very experienced with dependency management in Python but it seems that all of the dependencies in requirements.txt could alternatively be placed in the setup.py file under the install_requires field as follows: setup( ... …
jsstuball
  • 4,104
  • 7
  • 33
  • 63
3
votes
1 answer

Pip install in Virtualenv working, but *not* working with `-r requirements.txt`

I am hitting a unique version of the well documented Virtualenv-Pip bug discussed in answers like here and here. In these cases the issue was pip was installing in a global folder, in some cases because the shebang in one of the pip scripts was…
physincubus
  • 986
  • 2
  • 11
  • 26
3
votes
1 answer

install tar.gz with pip at requirements.txt

i want to install electrum-ltc into my app like this: but if i include this line in my requirements.txt the role-out fails and i have to install it manually with the same line shown above. if i install it like this at the requirements.txt: some…
user10000033
3
votes
1 answer

Why is requirements.txt not being installed on deployment to AppEngine?

I'm attempting to upgrade an existing project to the new Python 3 AppEngine Standard Environment. I'm able to deploy my application code, however the app is crashing because it can not find dependencies that are defined in the requirements.txt file.…
3
votes
3 answers

ModuleNotFoundError when setting up Google Cloud Function with Cloud Source repository

I am deploying a Google Cloud Function based on code in a BitBucket repository. I have already linked up the BitBucket account to Google Cloud "Source Repositories" and the Google Function can find the repo, etc. The problem is that my main.py…
3
votes
1 answer

Invalid "requirements_file": path docs/requirements.txt does not exist

While updating the docs on my project using ReadTheDocs, I have no suddenly started getting this error: Problem parsing YAML configuration. Invalid "requirements_file": path docs/requirements.txt does not exist What's strange is that there very…
Benjamin Lee
  • 481
  • 1
  • 5
  • 15
3
votes
2 answers

Why is it best practice to include the dependencies' dependencies in requirements.txt?

I appreciate that in many circumstances it is important to explicitly state what dependency versions we are working with and that this thus applies to the nested dependencies as well. However, it becomes very messy when we decide to remove a…
Ludo
  • 2,307
  • 2
  • 27
  • 58
3
votes
2 answers

How do I run an Ansible pip task that uses a requirements file over a proxy?

We have recently setup up a development box that we want to be able to install our software on. We are using Ansible and it all works fine on our local environments but this new box is set up to access the outside world via a proxy. This has meant…
BDoherty
  • 29
  • 1
  • 3
3
votes
1 answer

What's with the definition of Environment Marker Variable `python_version` in PEP 508 if the Python version might consist of more than 3 characters?

Just a quick question I stumbled upon. It's not really important, but I'm interested in the reason for this and haven't found a quick answer, yet. According to PEP 508 -- Environment Markers (section "Specification" - "Environment markers") marker…
finefoot
  • 9,914
  • 7
  • 59
  • 102
3
votes
1 answer

Ignoring some requirements when installing pip requirements

I am using requirements.txt to install requirements for my virtualenv. I use ansible for deployments which installs requirements on remote hosts. Problem: Ignoring some requirements Ignoring already installed requirements (something like pip freeze…
Ranvijay Jamwal
  • 661
  • 1
  • 6
  • 17
3
votes
0 answers

Make Python libraries installed with requirements.txt immediately available

Here's a very simple requirements.txt: numpy sharedmem The problem is, sharedmem actually depends on having numpy available to even run its setup.py, it's an install dependency. Running pip install -r requirements.txt does try to install numpy…
isagalaev
  • 1,173
  • 11
  • 16
3
votes
0 answers

pip environment markers with specific wheel files in requirements.txt

Environment markers in pip requirements.txt files have been working fairly well for me until now.... I have locally built wheels that I would like to explicitly specify in the requirements.txt file. This works well, except that for some reason,…
ghoff
  • 301
  • 1
  • 3
  • 10
3
votes
1 answer

Could not open requirements file: [Errno 2] No such file or directory: './requirements.txt' Python on Mac

I am trying to use this code from github. The first three commands to get this started are: pip install bitfinex bitfinex-poll-orderbook pip install -r ./requirements.txt The first two work perfectly fine and I am able see the orderbook for…
esaunde1
  • 91
  • 2
  • 3
  • 11