r/redditdev • • Jun 18 '14

AttributeError: can't set attribute

Am I the only one who's getting that since the latest update?

Not sure about the exact causes yet, but for comment in comment_generator: doesn't work anymore for example.

17 Upvotes

290 comments sorted by

View all comments

Show parent comment

2

u/_Daimon_ Jun 19 '14

I don't think I understand the motivation for what you're doing. So I'm not sure if I can offer any help, but I assume you're aware of virtualenv? Which allows for installing modules on a per-project basis, so you can one version of six in one project and another in a different project.

0

u/nandhp Jun 19 '14

Yeah, the motivation is a bit fuzzy, especially in hindsight. I think it can be boiled down to my attitude at the time being roughly equal parts

  1. "If it ain't broke don't fix it", and
  2. I didn't want to install Python modules system-wide without using apt-get (generally a good idea but, unfortunately, the default behavior) and setting up virtualenv or a per-user site-packages directory sounded too hard.

However, today:

  1. It was broke.
  2. A while back, I set my PYTHONLIB environment variable and, more importantly, I learned how the ~/.pydistutils.cfg file can be used to install modules into a private site-packages directory by default.

I suppose I could get rid of the git clone and just use easy_install. But it ain't broke anymore....

TL;DR: The motivation isn't easy to understand in hindsight. It's probably best not to try.