The basic_example.py works fine, but I can't get the runtests.py that needs django to work. Even though everything is installed.
sh-3.2# python ./runtests.py
Traceback (most recent call last):
File "./runtests.py", line 12, in <module>
from django.test.utils import get_runner
File "/Library/Python/2.7/site-packages/django/test/__init__.py", line 5, in <module>
from django.test.client import Client, RequestFactory
File "/Library/Python/2.7/site-packages/django/test/client.py", line 13, in <module>
from django.core.handlers.base import BaseHandler
File "/Library/Python/2.7/site-packages/django/core/handlers/base.py", line 12, in <module>
from django.urls import get_resolver, get_urlconf, set_urlconf
File "/Library/Python/2.7/site-packages/django/urls/__init__.py", line 1, in <module>
from .base import (
File "/Library/Python/2.7/site-packages/django/urls/base.py", line 11, in <module>
from .exceptions import NoReverseMatch, Resolver404
File "/Library/Python/2.7/site-packages/django/urls/exceptions.py", line 3, in <module>
from django.http import Http404
File "/Library/Python/2.7/site-packages/django/http/__init__.py", line 5, in <module>
from django.http.response import (
File "/Library/Python/2.7/site-packages/django/http/response.py", line 13, in <module>
from django.core.serializers.json import DjangoJSONEncoder
File "/Library/Python/2.7/site-packages/django/core/serializers/__init__.py", line 23, in <module>
from django.core.serializers.base import SerializerDoesNotExist
File "/Library/Python/2.7/site-packages/django/core/serializers/base.py", line 4, in <module>
from django.db import models
File "/Library/Python/2.7/site-packages/django/db/models/__init__.py", line 3, in <module>
from django.db.models.aggregates import * # NOQA
File "/Library/Python/2.7/site-packages/django/db/models/aggregates.py", line 5, in <module>
from django.db.models.expressions import Func, Star
File "/Library/Python/2.7/site-packages/django/db/models/expressions.py", line 5, in <module>
from django.db.backends import utils as backend_utils
File "/Library/Python/2.7/site-packages/django/db/backends/utils.py", line 12, in <module>
from django.utils.timezone import utc
File "/Library/Python/2.7/site-packages/django/utils/timezone.py", line 8, in <module>
import pytz
ImportError: No module named pytz
sh-3.2# pip install pytz
Requirement already satisfied: pytz in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
sh-3.2#
Try to install dev-requirement pip install -r dev-requirements.txt
I think the pytz installed at system level, may be you could try to install pip install --user pytz
Some good stuff about user level access https://gist.github.com/saurabhshri/46e4069164b87a708b39d947e4527298
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I think the
pytzinstalled at system level, may be you could try to installpip install --user pytzSome good stuff about user level access https://gist.github.com/saurabhshri/46e4069164b87a708b39d947e4527298