November 27th, 2014
In Technology
No Comments
If you enjoy this article, see the other most popular articles
If you enjoy this article, see the other most popular articles
If you enjoy this article, see the other most popular articles
Weird that under Python 3.4 runtime you can import from 2.7
(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at: lawrence@krubner.com, or follow me on Twitter.
Weird that under Python 3.4 runtime you can import from 2.7. That should not be possible for all those sanity reasons.
Because allowing that means:
Thanks. I might miss something obvious but when using gunicorn MYPROJECT.wsgi:application i get:
File “/virtualenv/lib/python3.4/site-packages/django/utils/timezone.py”, line 13, in
import pytz
File “/virtualenv/lib/python3.4/site-packages/pytz/__init__.py”, line 37, in
from pytz.lazy import LazyDict, LazyList, LazySet
File “/virtualenv/lib/python3.4/site-packages/pytz/lazy.py”, line 3, in
from UserDict import DictMixin
File “/usr/lib/python2.7/UserDict.py”, line 134
raise TypeError, “pop expected at most 2 arguments, got “\
^
SyntaxError: invalid syntax
Obviously the problem is that my Virtualenv has /usr/lib/python2.7 in its Path. But i don’t find the right place to change that. I have no PYTHONPATH environment variable.
and finally:
I found my problem. There was a sys.path.append with python 2.7 in my wsgi which was quite outdated.
Post external references
- 1
https://github.com/benoitc/gunicorn/issues/705
February 8, 2022 9:33 am
From Michael S on How I recovered from Lyme Disease: I fasted for two weeks, no food, just water
"Did you have Bartonella, too? Seems it uses autogenesis..."