无法满足Django的应用程序要求

时间:2018-04-23 14:48:44

标签: python django pip virtualenv

我从下午开始尝试运行Django应用程序。该应用程序可能使用Python 2.7。我已经创建了虚拟环境,我已经使用Python PIP包管理器安装了Django。但是,此应用程序需要JQuery包才能正常工作。不幸的是,当我尝试使用PIP安装JQuery包时出现错误:

(my_env) user➜~/carcaresilesia» pip install jquery    [16:39:44] ⚡[..........]
Collecting jquery
  Using cached https://files.pythonhosted.org/packages/05/45/9a6d7ff770b1279c901c8dfca1f9a9d6c9822d75a2bad834d0e2ddd4f8cd/jquery-1.2.3.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-wKwd78/jquery/setup.py", line 2, in <module>
        from turbogears.finddata import find_package_data
    ImportError: No module named turbogears.finddata

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-wKwd78/jquery/

我尝试安装turbogears软件包,但由于以下错误而失败:

(my_env) user➜~/carcaresilesia» pip install turbogears
Collecting turbogears
  Using cached https://files.pythonhosted.org/packages/1d/35/80872474a6663b6994b6879041a38b2fa81a34098e331f2ffddd43e2c8d3/TurboGears-1.5.1.tar.gz
Collecting CherryPy>=3.1.2 (from turbogears)
  Using cached https://files.pythonhosted.org/packages/b8/6d/d0d951dee5ba50900eccb71ef501a847d0392f50056d36234740f97a2ef8/CherryPy-14.2.0-py2.py3-none-any.whl
Collecting ConfigObj>=4.3.2 (from turbogears)
  Using cached https://files.pythonhosted.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz
Collecting FormEncode>=1.2.1 (from turbogears)
  Using cached https://files.pythonhosted.org/packages/2f/53/707c2b9b65ea6bedde67c21cbf7c71394f4a198620d4e9c1771214b91dcc/FormEncode-1.3.1.tar.gz
Collecting Genshi>=0.4.4 (from turbogears)
  Using cached https://files.pythonhosted.org/packages/c5/2f/34493b2286561d0ea003c568a6c80343eee3c9975a69964d22ce8501dd3f/Genshi-0.7.tar.gz
Collecting PasteScript[cheetah]>=1.7 (from turbogears)
  Using cached https://files.pythonhosted.org/packages/06/7d/ddc3efab0967e7056bcd6adea0b860717b4b6e4d3ea8ec49985ed0f43cb0/PasteScript-2.0.2-py2.py3-none-any.whl
  Ignoring Cheetah: markers 'extra == "Cheetah"' don't match your environment
Collecting PEAK-Rules>=0.5a1.dev-r2555 (from turbogears)
  Could not find a version that satisfies the requirement PEAK-Rules>=0.5a1.dev-r2555 (from turbogears) (from versions: )
No matching distribution found for PEAK-Rules>=0.5a1.dev-r2555 (from turbogears)

如何满足这些依赖关系?

1 个答案:

答案 0 :(得分:3)

您的项目几乎肯定不依赖于python package jQuery,因为它似乎适用于turbogears,这是与Django完全不同的Web框架。

如果您的模板需要jQuery,那么您应该下载并将其添加到静态文件中,或使用a CDN