夹层4.2.3要求django< 1.11,> = 1.8,但你会有django 2.0.2这是不兼容的

时间:2018-05-24 10:36:54

标签: python pip command-prompt

C:\Users\USER\Documents\Py_Project\CBD Robotics\week5>pip install imagekit
Collecting imagekit
  Downloading https://files.pythonhosted.org/packages/45/7c/a762c3902a1173cd9801
0ddc2ce588b5764220d47f09d801f5eab6b5bee4/imagekit-1.0.6.tar.gz
Building wheels for collected packages: imagekit
  Running setup.py bdist_wheel for imagekit ... done
  Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\60\7a\6a\b6c
8af51341a51376cf1fe8a5b876086d84f2bc3683ee6b8c8
Successfully built imagekit
mezzanine 4.2.3 has requirement django<1.11,>=1.8, but you'll have django 2.0.2
which is incompatible.
Installing collected packages: imagekit
Successfully installed imagekit-1.0.6

C:\Users\USER\Documents\Py_Project\CBD Robotics\week5>
C:\Users\USER\Documents\Py_Project\CBD Robotics\week5>pip3 install imagekit
Requirement already satisfied: imagekit in c:\users\user\anaconda3\lib\site-pack
ages (1.0.6)
mezzanine 4.2.3 has requirement django<1.11,>=1.8, but you'll have django 2.0.2
which is incompatible.

我正在尝试安装一些库,但每次我想安装新库。我从命令行

遇到了这条消息

2 个答案:

答案 0 :(得分:1)

首先,请注意此消息是警告,而不是错误,并且imagekit软件包已在您当前的环境中正确安装。

现在关于警告:它告诉您当前环境包含夹层版本4.2.3和Django版本2.0.2,它们不兼容(夹层4.2.3需要django 1.8到1.11)。你提到你“正在做与django无关的事情”,那么,为什么你在这个环境中安装了django和mezzanine呢?如果那些是全局安装(在virtualenv之外)那么你做错了,你应该单独留下全局(系统)env并为你的项目使用virtualenvs,这样你就不会有破坏的依赖问题。

答案 1 :(得分:1)

具有Django 2.2支持的Mezzanine 4.3.1 (直到发布Mezzanine v.5发行版为止)

您可以在需求中使用以下行

-e git+git://github.com/stephenmcd/mezzanine.git@9768b46f8377796d5d51d74db54589c9d3669a47#egg=Mezzanine # feat: Add Django 2.2 compatability (#1956)

或点子 pip install -e git+git://github.com/stephenmcd/mezzanine.git@9768b46f8377796d5d51d74db54589c9d3669a47#egg=Mezzanine

related PR