0

Based on my app I need the django-microblogging==0.2.dev1 package, but when I put that in requirements.txt, it can't find this particular version.

And when I use the version it can find (an older version), I get errors with my application and I believe it's due to this older version.

I was able to google the 0.2.dev1 version and downloaded the source which I found here: http://dist.pinaxproject.com/dev/django-microblogging/

I untarred it and put the following in my requirements.txt file: -I ./django-microblogging-0.2.dev1

But now I'm getting the following error message:

ValueError: ('Expected version spec in', '-I ./django-microblogging-0.2.dev1', 'at', ' ./django-microblogging-0.2.dev1')

I have also tried -I ./django-microblogging-0.2.dev1 == 0.2.dev1

Does anyone have any idea how I can correct this error? It's totally stumping me.

okm
  • 23,575
  • 5
  • 83
  • 90
user1328021
  • 9,110
  • 14
  • 47
  • 78

1 Answers1

1

Update

The issue seems to be the failure to uninstall old django-microblogging-0.1.2 from virtualenv in heroku. Tried the method in https://stackoverflow.com/a/9463068/165603 to uninstall the previous version and it seems to work.

In particular the command used was:

heroku config:add BUILDPACK_URL=git@github.com:heroku/heroku-buildpack-python.git#purge

Try to put

django-microblogging-0.2.dev1.tar.gz
# or
path_to/django-microblogging-0.2.dev1.tar.gz

in requirements.txt directly. When you use relative path, it should be relative to the directory inside which you're running the pip.

Also, you could use

django-microblogging==0.2.dev1
Community
  • 1
  • 1
okm
  • 23,575
  • 5
  • 83
  • 90
  • Well now it can't find the dir ... I get: `IOError: [Errno 2] No such file or directory: '/tmp/build_349bgfbfucapl/-I path_to/django-microblogging-0.2.dev1.tar.gz'` .... I tried both methods -- using the -I flag as above – user1328021 May 20 '12 at 14:18
  • Also if I just use the untarred folder I get the Value error still... even with path_to or not using the ./ as you suggested above --> `ValueError: ('Expected version spec in', '-I path_to/django-microblogging-0.2.dev1', 'at', ' path_to/django-microblogging-0.2.dev1')` – user1328021 May 20 '12 at 14:21
  • @user1328021 Just use the line I wrote, don't include `-I`. If you want to use `-I`, use `pip install -I -r requirements.txt` – okm May 20 '12 at 14:31
  • So when I use the tarred file (versus untarred) I get the error of the file/directory not being found. So I'm using the untarred... But the only reason I'm using -I is because when I don't use it, it says there's already an older version. Exact error without the -I: `Found existing installation: django-microblogging 0.1.2` and `Exception: AssertionError: Egg-link ../../../../src/microblogging does not match installed location of django-microblogging (at /tmp/build_3sy86vjvo8mvt/.heroku/src/microblogging)` – user1328021 May 20 '12 at 14:39
  • Should I close this question and make that a separate question? – user1328021 May 20 '12 at 14:46
  • @user1328021 I've tried pip w/ distribute, both `pip install -r requirements.txt`, `pip install -U -r requirements.txt` and `pip install-U -r requirements.txt` work well. Probably the error is caused by setuptools, you could try to `pip uninstall django-microblogging` at first then. – okm May 20 '12 at 14:46
  • @user1328021 no need IMO, its relative and your problem still has not been solved. You could update the question for any progression. – okm May 20 '12 at 14:47
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/11482/discussion-between-okm-and-user1328021) – okm May 20 '12 at 14:53