gpt4 book ai didi

python - 在安装 django-tracking 时遇到错误

转载 作者:行者123 更新时间:2023-11-28 22:53:51 25 4
gpt4 key购买 nike

我正在尝试安装 django-tracker 并将其解压缩到一个目录中,现在当我运行 python setup.py 时出现以下错误

     vikas@vikas-laptop:~/djcode/django-tracking-0.4.1$ python setup.py
Traceback (most recent call last):
File "setup.py", line 6, in <module>
import tracking
File "/home/vikas/djcode/django-tracking-0.4.1/tracking/__init__.py", line 1, in <module>
import listeners
File "/home/vikas/djcode/django-tracking-0.4.1/tracking/listeners.py", line 6, in <module>
from django.core.cache import cache
File "/usr/local/lib/python2.7/dist-packages/django/core/cache/__init__.py", line 70, in <module>
if DEFAULT_CACHE_ALIAS not in settings.CACHES:
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 53, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 46, in _setup
% (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting CACHES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

谁能帮我解决这个问题?

最佳答案

尝试以下替代方法:

pip install git+https://github.com/bashu/django-tracking.git

这对我有用。以下是相同的痕迹:

root@3239fee56ba9:/home/docker/code/gstudio/gnowsys-ndf# pip install git+https://github.com/bashu/django-tracking.gitCollecting git+https://github.com/bashu/django-tracking.git  Cloning https://github.com/bashu/django-tracking.git to /tmp/pip-IMNBJq-buildRequirement already satisfied (use --upgrade to upgrade): django>=1.4 in /usr/local/lib/python2.7/dist-packages (from django-tracking==0.4.1)Installing collected packages: django-tracking  Running setup.py install for django-tracking ... doneSuccessfully installed django-tracking-0.4.1

关于python - 在安装 django-tracking 时遇到错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18930640/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com