我的Django安装在虚拟环境中缺少管理模板文件夹 [英] My Django installs in virtual env are missing admin templates folder
问题描述
当我安装一个venv并在其中安装Django,例如DjangoUpgrade,那么我在这个路径上缺少模板文件夹
When I Install a venv and install Django in it for example "DjangoUpgrade" then I am missing at this path the templates folder
:~/.venvs/DjangoUpgrade/local/lib/python2.7/site-packages/django/contrib/admin
只要清楚这是该文件夹的ls。
Just to be clear this is the ls from that folder.
actions.py exceptions.py filters.py forms.py helpers.py __init__.py models.py options.py sites.py templatetags tests .pyc util.pyc validation.pyc widgets.py
actions.pyc exceptions.pyc filters.pyc forms.pyc helpers.pyc __init __。pyc models.pyc options.pyc sites.pyc tests.py util.py验证。 py视图widgets.pyc
这个发生在Django 1.3 / 1.4完全新鲜的venvs中,无论什么都没有安装当所有其他东西都通过pip安装好的时候。
This happens at Django 1.3 / 1.4 in completely fresh venvs, both when nothing else is installed yet and when everything else is installed fine via pip.
当我从一个工作的同事中复制admin模板文件夹时,正确的安装就可以完美地工作。这里有什么问题?
When I copy the admin templates folder from a working colleagues correct install it works then perfectly. What is going wrong here?
[我们正在升级版本atm,原谅旧的Django版本,仍然支持]
[We're upgrading through the versions atm so forgive the older Django version, it's still supported though]
python 2.7.3。
Django 1.4.20
pip 7.0.3
python 2.7.3. Django 1.4.20 pip 7.0.3
推荐答案
要解决这个问题,你应该使用 -no-binary,而安装django。
To solve this issue you should use "--no-binary" while installing django.
pip install --no-binary django -r requirements.txt
或
pip install --no-binary django django==1.4.21
记住将PIP安装升级到有--no-binary选项。
Remember to upgrade your PIP installation to have the "--no-binary" option.
您可以在此链接中获取更多信息:
https://github.com/pipa/pip/issues/2823
You can get further information in this link: https://github.com/pypa/pip/issues/2823
这篇关于我的Django安装在虚拟环境中缺少管理模板文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!