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

Heroku Python app with custom package in Aptfile : no python packages installed from requirements.txt

I'm attempting to install a package and I was pointed in the direction of installing heroku-buildpack-apt and heroku-buildpack-multi. This seems to work and now the project builds on the remote and I have installed multi using: heroku config:set…
disruptive
  • 5,687
  • 15
  • 71
  • 135
3
votes
0 answers

Can I have a single Python requirements.txt file for multiple versions of Python?

I'm just getting started with virtualenv and virtualenvwrapper on Windows 7. I've created 3 different test projects using (respectively) Python 2.7, 3.4 and 3.5 I'd like to create a single requirements.txt file that installs the right binary lxml…
George Adams
  • 458
  • 4
  • 15
3
votes
1 answer

Python package requirements: Usage of version specifiers == and >=

I'm looking for best practices, do's and don'ts regarding version specifications in requirement's files for pip in python packages. Assume a python package which depends on some other modules. A minimum version is required for most of them. At least…
sebix
  • 2,943
  • 2
  • 28
  • 43
3
votes
0 answers

Trying to install new version of a package in requirements.txt

I'm using a Django app that has recently been updated. I put this new package info in my requirements.txt file and it installs correctly. But, I can't get my database to register it (I'm using Django 1.5.8). The new version of the app includes a new…
steph
  • 701
  • 2
  • 10
  • 30
3
votes
0 answers

How to have multiple django requirements file mentioned in fig file for docker deployment across dev, staging and prod servers?

I just wrote my first fig file. It makes working with docker really awesome. I want fig to launch my local, staging, and prod containers as well. So I wrote 3 different fig files. fig-dev.yml, fig-stage.yml and fig-prod.yml. The three yml files…
whatf
  • 6,378
  • 14
  • 49
  • 78
3
votes
3 answers

Generate requirements based on used imports

Is there any tool to generate requirements file based on actually used imports in your project, not only on output of pip freeze? Rationale, as I see it: it's nice and simple to generate requirements with pip freeze, when you start the project.…
eyeinthebrick
  • 528
  • 1
  • 5
  • 21
3
votes
0 answers

How to deal with pypi requirements.txt that are specific to dev environments?

I have this kind of conundrum regarding how to deal with requirements.txt: my package has a list of 4-6 requirements needed to install and use the package, still in order to run the unittests and to develop you have a much bigger set. If I put all…
sorin
  • 161,544
  • 178
  • 535
  • 806
3
votes
0 answers

svn 1.8 gets confused with password in repo string (using python pip)

The pip requirements.txt file format has the option to specify a line like this: svn+https://username:password@hostname/repo/subpath#egg=modulename==version Then you run this command and pip will make a checkout, run setup.py and install the module…
jonnie
  • 101
  • 1
  • 10
3
votes
1 answer

Force recreation of Heroku slug on git push

I'm hosting a Django app on Heroku for a while already, and so far it worked fine. I now made some changes in the requirements.txt file, but feel like they are not correctly installed on Heroku when I make the git push. The log output shows the…
SimonSays
  • 10,867
  • 7
  • 44
  • 59
3
votes
0 answers

How do I specify "Twisted Web" as a pip requirement?

I am packaging my program and I am having trouble with the "Twisted Web" dependency. I tried inputting all of the following combos in the setup.py file: install_requires = ['Twisted Web>=12.2.0'], install_requires =…
metakermit
  • 21,267
  • 15
  • 86
  • 95
3
votes
1 answer

Is there a way to run 2to3 with pip install?

I'm trying to maintain dependencies using pip install -r requirements.txt. However, some of required packages do not support Python 3 directly, but can be converted manually using 2to3. Is there a way to force pip to run 2to3 on those packages…
eigenein
  • 2,083
  • 3
  • 25
  • 43
2
votes
1 answer

pipreqs generate requirements.txt with conflict versions

i use pipreqs to generate requirements.txt, the generated requirements.txt has a library GitPython with two versions 3.1.31 and 3.1.32 my command is python3 -m pipreqs.pipreqs $BASEDIR --force log is: WARNING: Import named "GitPython" not found…
Jade
  • 416
  • 5
  • 7
2
votes
1 answer

Generate aligned requirements.txt and dev-requirements.txt with pip-compile

I have a Python project that depends on two packages moduleA and moduleB. I have the following pyproject.toml: [project] name = "meta-motor" version = "3.1.0.dev" dependencies = [ "moduleA==1.0.0" ] [project.optional-dependencies] dev = [ …
Kins
  • 547
  • 1
  • 5
  • 22
2
votes
1 answer

Python requirements.txt restrict dependency to be installed only on atom processors

I'm using TensorFlow under inside an x64_64 environment, but the processor is an Intel Atom processor. This processor lacks the AVX processor extension and since the pre-built wheels for TensorFLow are complied with the AVX extension TensorFLow does…
k_o_
  • 5,143
  • 1
  • 34
  • 43
2
votes
0 answers

Is there a way to check for conflicts in requirements.txt prior to pip install?

I have a long list of dependencies for my project. pip install -r requirements.txt in an empty (virtual) environment takes several minutes. I wanted to update several packages and I'm now stuck a cycle of pip aborting the install because of…
Pichler
  • 59
  • 5