pip install of requirements.txt fail

3,125 views
Skip to first unread message

Thurston County Planning

unread,
Sep 27, 2013, 12:04:57 PM9/27/13
to opentree...@googlegroups.com
I'm following along with the Vagrant-based install guide (which has been great by the way!), but it appears that in Step 3 the pip install of the requirements.txt file didn't work.

I actually didn't realize this until I got to the patch for django-sorting and found that it didn't exist. Looking in the site-packages directory, I'm not seeing the vast majority of the libs from the list in there. Tried running pip install again in verbose mode to see what might be going on and got a long stream of errors. Does anyone have any helpful thoughts?

I'm also working on adding more detail and screen shots to my own version of the guide to address some of the minor hangups I've run into and make it a little more approachable for someone like me who is tech savvy and has some coding & command line experience, but isn't necessarily a Linux or shell expert. I'm hoping that if I can make it through the setup successfully, I can share my notes with others who might benefit.

Thanks in advance. I'd be really excited if I could get a functioning tree map up and running!

Andrew Thompson

unread,
Sep 27, 2013, 1:03:54 PM9/27/13
to opentree...@googlegroups.com
Hi Thurston County Planning (do you have a personal name/handle?),

If you can paste your errors you got from the "pip install -r requirements.txt" command to the list, we might be able to provide more insight on the issue you're running into. Also, what version of linux and/or Python are you using?

Also, just so you're aware if you're new to the project, Azavea is currently working hard developing the next-generation version of OpenTreeMap, at https://github.com/azavea/OTM2. OTM2 will be pretty radically rebuilt from the current OTM1 (and easier to install is our goal!), launch as a cloud service at opentreemap.org in mid-October, and probably the code will be clean enough for a proper open source release several weeks/months after that. So you're welcome to start with OpenTreeMap 1, just be aware the next version is coming down the pipe and you might want to upgrade at some point.

Thanks,

Andrew


--
You received this message because you are subscribed to the Google Groups "opentreemap-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentreemap-us...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Andrew Thompson, Community Evangelist

Azavea |  340 N 12th St, Ste 402, Philadelphia, PA
atho...@azavea.com  | T 215.701.7689  | F 215.925.2663
Web azavea.com  |  Blog azavea.com/blogs  | Twitter @azavea

Join our community! Google Groups:

Keith Bornhorst

unread,
Sep 27, 2013, 1:07:13 PM9/27/13
to opentree...@googlegroups.com
All of my initial installs (apt-get calls on an Ubuntu box) failed because I kept forgetting to run as superuser (sudo apt-get install ...). The first thing that came to mind - not sure if it's applicable in your case or with pip. Otherwise, post a few of the error messages as Andrew suggests.

Good luck! 

Thurston County Planning

unread,
Sep 27, 2013, 3:00:48 PM9/27/13
to opentree...@googlegroups.com
Ha, sorry about that, I just used my work account and didn't think about it- my name is Josh.

Pip created a log file, but it's over 6,000 lines, so I'll have to dig into it to get some specifics. I'm following the whole guide, including the use of Vagrant. So it created a Ubuntu 12.04 VM. Python is 2.7 via virtualenv. I'm not sure it matters, but I'm using Git Bash on a 64-bit Windows 7 host computer.

I've actually been loosely following OTM for the last couple years, essentially waiting for it to get down to my level of technical expertise ;) When I checked back in just recently, I saw the guide, read through it and finally felt like it was all within my grasp, so I decided to give it a go. But I've definitely been itching to make a tree map for our county for a long time. This would be a particularly opportune time since we're working on our first urban forestry management plan. I'm excited to see what OTM2 brings and I'll be interested to compare the cloud/subscription option with the standalone version. I'll probably keep hacking away at OTM1 in the meantime, just to try to learn it better and see how far I can get.

Thanks,
Josh

Thurston County Planning

unread,
Sep 27, 2013, 3:05:33 PM9/27/13
to opentree...@googlegroups.com
Hey Keith,

Thanks for the input. Since I did sudo su right at the beginning, I think that's not the case here. All my other apt-get calls haven been working. Maybe I should try manual installs of the required dependencies...

Andrew Thompson

unread,
Sep 28, 2013, 12:26:34 AM9/28/13
to opentree...@googlegroups.com
6,000 lines! Hmm...I believe I created the install guide using Git Bash ssh'ing into vagrant, too, so I don't think that's your problem.

Even just send us the first 50 and last 50 lines, maybe we can find a clue.


On Fri, Sep 27, 2013 at 3:05 PM, Thurston County Planning <thurston...@gmail.com> wrote:
Hey Keith,

Thanks for the input. Since I did sudo su right at the beginning, I think that's not the case here. All my other apt-get calls haven been working. Maybe I should try manual installs of the required dependencies...

--
You received this message because you are subscribed to the Google Groups "opentreemap-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentreemap-us...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thurston County Planning

unread,
Sep 30, 2013, 12:45:33 PM9/30/13
to opentree...@googlegroups.com
Erg. I'm using Nano from within Git Bash to view the pip log file, but it's not really working. When I page down or page up the screen doesn't fully refresh, so lines from one page are getting mashed with lines from another, making it useless to try to copy anything from it.

I didn't configure a shared folder in my vagrantfile, so I don't think I can get the log file onto my host computer either. I think I might be stuck.

I'm going to start fresh, this time with shared folder, and see what I can get.

Thanks again for the help thus far!
Josh


On Friday, September 27, 2013 9:26:34 PM UTC-7, Andrew Thompson wrote:
6,000 lines! Hmm...I believe I created the install guide using Git Bash ssh'ing into vagrant, too, so I don't think that's your problem.

Even just send us the first 50 and last 50 lines, maybe we can find a clue.

Thurston County Planning

unread,
Sep 30, 2013, 2:23:37 PM9/30/13
to opentree...@googlegroups.com
Okay, I got the log file. Rather than gunk up the thread with too much pasted text, I'm just attaching the whole file here. If you have the time and inclination to give it a quick scan to see if anything pops out as blatantly wrong, I would appreciate it hugely!
pip.log

Alan Humphrey

unread,
Sep 30, 2013, 3:56:51 PM9/30/13
to opentree...@googlegroups.com
From here: https://github.com/celery/django-celery/issues/261

It looks like you might get further if you install pytz first.

pip install pytz


On Mon, Sep 30, 2013 at 11:23 AM, Thurston County Planning <thurston...@gmail.com> wrote:
Okay, I got the log file. Rather than gunk up the thread with too much pasted text, I'm just attaching the whole file here. If you have the time and inclination to give it a quick scan to see if anything pops out as blatantly wrong, I would appreciate it hugely!

--

Thurston County Planning

unread,
Sep 30, 2013, 4:58:53 PM9/30/13
to opentree...@googlegroups.com
Awesome Alan! That looks like it worked! I did have to use the "--pre" flag to get pytz to install though, based on some other comments from the link you provided:

Using: pip install pytz
gave me the error saying "Could not find a version that satisfies the requirements of pytz", then listing all the version numbers

Using: pip install --pre pytz
got it to succeed

I then re-ran the install from requirements.txt and this time got a success message at the end. Checking my site-packages directory, it is now a lot more full and happy-looking.

Thanks so much for the help!
Josh

Andrew Thompson

unread,
Sep 30, 2013, 10:16:11 PM9/30/13
to opentree...@googlegroups.com
Hi Josh,

Took a look at your log file. Everything looks right except the last bit:

======================

  Removing temporary dir /var/projects/otm/otm_env/build...
No distributions matching the version for pytz (from django-celery==3.0.17->-r requirements.txt (line 11))

Exception information:
Traceback (most recent call last):
  File "/var/projects/otm/otm_env/local/lib/python2.7/site-packages/pip/basecommand.py", line 134, in main
    status = self.run(options, args)
  File "/var/projects/otm/otm_env/local/lib/python2.7/site-packages/pip/commands/install.py", line 236, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/var/projects/otm/otm_env/local/lib/python2.7/site-packages/pip/req.py", line 1085, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "/var/projects/otm/otm_env/local/lib/python2.7/site-packages/pip/index.py", line 309, in find_requirement
    raise DistributionNotFound('No distributions matching the version for %s' % req)
DistributionNotFound: No distributions matching the version for pytz (from django-celery==3.0.17->-r requirements.txt (line 11))

=========================

I can't tell if this means pip is floundering on pytz (a timezone library) or django-celery which might require pytz. I'd try removing either line that sounds like one of those from the OpenTreeMap requirements.txt file and seeing if pip installs everything correctly. If that works, we'll have isolated your problems to one of those two, and you might be able to try installing them manually.

Unless anyone else can comment?

-Andrew


On Mon, Sep 30, 2013 at 2:23 PM, Thurston County Planning <thurston...@gmail.com> wrote:
Okay, I got the log file. Rather than gunk up the thread with too much pasted text, I'm just attaching the whole file here. If you have the time and inclination to give it a quick scan to see if anything pops out as blatantly wrong, I would appreciate it hugely!

--
You received this message because you are subscribed to the Google Groups "opentreemap-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentreemap-us...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--

Thurston County Planning

unread,
Oct 1, 2013, 11:45:12 AM10/1/13
to opentree...@googlegroups.com
Thanks Andrew,

From what I gathered doing some research starting with Alan's link, django-celery requires pytz, but doesn't specify a version number. Pytz uses an unconventional version numbering system that pip reads as a pre-release version. However, the latest version of pip won't install pre-release versions by default and therefore the pytz installation fails (which then cascaded to the rest of the requirements.txt list).

It appears there are a number of different workarounds. There's the one I used to manually install pytz from the command line:
pip install --pre pytz

Or a couple options for updating the setup file, telling it to install some version number at least as recent as the one listed:
pytz >= 2013b
pytz >= 0a

More info here:
https://github.com/celery/django-celery/issues/261 (Alan's link)
https://github.com/getpelican/pelican/commit/f2aef81c963c8daaa29ac28dba84243e6198c30f
https://github.com/pypa/pip/issues/974

Once I got pytz to install and re-ran the install of requirements.txt, everything appears to have worked flawlessly. It might be worth updating the OTM files and/or adding a note to the installation guide until the issue gets resolved.

Thanks again for your help, I really appreciate it!

Josh

Andrew Thompson

unread,
Oct 7, 2013, 3:30:52 PM10/7/13
to opentree...@googlegroups.com
Thanks for your sleuthing, Josh. I've added a note and link to this thread from the install guide.

jr...@courtdatatech.com

unread,
Feb 27, 2014, 2:57:28 PM2/27/14
to opentree...@googlegroups.com
Just tried the vagrant install today and ran into:

Downloading/unpacking PIL==1.1.7 (from -r requirements.txt (line 7))
  Could not find any downloads that satisfy the requirement PIL==1.1.6 (from -r requirements.txt (line 7))
  Some externally hosted files were ignored (use --allow-external PIL to allow).

fixed by:
pip install --no-index -f http://dist.plone.org/thirdparty/ -U PIL
 from:

Thad Curtz

unread,
Feb 27, 2014, 5:22:12 PM2/27/14
to opentree...@googlegroups.com
I seem to have done this successfully with:


Best wishes,
Thad Curtz

Leonard Loo

unread,
Oct 13, 2016, 10:17:49 PM10/13/16
to opentreemap-user
This doesn't work for me. 
I have error showing 
'Failed building wheel for PIL'
Reply all
Reply to author
Forward
0 new messages