1

I want to be able to install a specific version of a github repo. I followed the instructions given here and my file requirements.txt looks as follows:

git://github.com/twoolie/NBT@f9e892e

I also tried the following versions:

git+git://github.com/twoolie/NBT@f9e892e
git+git://github.com/twoolie/NBT.git@f9e892e
git://github.com/twoolie/NBT.git@f9e892e

but in every case when I try to install the actual package, which requires the repository NBT from commit hash f9e892e, I get the error message

error in PyBlock setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Invalid requirement, parse error at "'://githu'"

So how to do it correctly?

Alex
  • 41,580
  • 88
  • 260
  • 469
  • I've tried putting `git+git://github.com/twoolie/NBT@f9e892` in a `requirements.txt` file and it works. Are you sure that this is the thing that causes your error? – rivamarco Dec 24 '19 at 10:51
  • When I put e.g. `NBT==1.5.0` in the `requirements.txt` file it works fine. When I put the string you suggest, I get the same error as before. – Alex Dec 24 '19 at 12:28
  • If I put only that line it works so maybe it could be an error on the package that depends on NBT and not NBT itself. – rivamarco Dec 24 '19 at 12:49

1 Answers1

1

I solved the problem by adding the following argument to the setup method in `setup.py':

install_requires=['NBT@git+git://github.com/twoolie/NBT@f9e892'],

and using an empty requirements.txt file. With these setting the install of the specific version of the package did work finally.

Alex
  • 41,580
  • 88
  • 260
  • 469