question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

what is the version of packages in requirements.txt

See original GitHub issue

hi, when i run python -m pip install --upgrade pip, I fail to install the packages, could you tell us the version of the required packages ?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
gpiatcommented, Dec 3, 2021

1.2.0 is the correct version of torch. The version of AllenNLP that is required is 0.8.2 fp16_e_s3. This is specified in the two first lines of the requirements.txt file:

# this is the fp16_e_s3 branch
git+git://github.com/matt-peters/allennlp.git@2d7ba1cb108428aaffe2dce875648253b44cb5ba

You cannot install this version from PyPI, hence the git+git:// requirement which builds the library from source.
Some versions of git won’t resolve this type of dependency, and if you are unable to update git (for instance if you’re working on a shared computing cluster), this method of installation may fail. That is why I suggest changing to git+https://, which works more consistently.
My version of git is 1.8.3.1. Unless your version of git is older than this, provided you have created your conda environment properly, pip install -r requirements.txt should install all the correct versions of all the dependencies you need.
If that fails, you can exit the kb directory, clone the AllenNLP 0.8.2 fp16_e_s3 repo and install it from source using

git clone https://github.com/matt-peters/allennlp.git
cd allennlp
git checkout fp16_e_s3
pip install -e .

The . is important, it refers to the working directory. Once that’s done (if it succeeded), you can comment out the second line of the requirements.txt file and run pip install -r requirements.txt.

This project will not work out-of-the-box with any version of AllenNLP you can get from PyPI. Matthew Peters’ fp16_e_s3 branch of AllenNLP implements support for half-precision floats, better support for resource path caching, and better support for querying AWS. If all else fails you may be able to get away with using vanilla AllenNLP 0.8.2 (pip install allennlp==0.8.2) if you replace most references to online resources with local paths in the JSONNET config files for the models. However, I would only recommend this as a last resort.

0reactions
gpiatcommented, Dec 9, 2021

My pleasure. Is your problem entirely solved? If so, would you be willing to close the issue, please?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does Python requirements file have to specify version?
No, there is no need to specify a version. It's probably a good idea to specify one, though.
Read more >
Python versioning with requirements.txt syntax — iscompatible ...
iscompatible v0.1.1. gives you the power of the pip requirements.txt syntax for everyday python packages, modules, classes or arbitrary functions.
Read more >
How to install Python packages with pip and requirements.txt
In the following example, a version of 1.0 or later and 2.0 or earlier (= 1.0 <= ver <= 2.0 ) is installed....
Read more >
Requirements File Format - pip documentation v22.3.1
Requirements files serve as a list of items to be installed by pip, when using pip install. Files that use this format are...
Read more >
The Python Requirements File and How to Create it
It is a simple text file that saves a list of the modules and packages required by your project. By creating a Python...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found