Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Aldryn Django与Django版本不兼容_Python_Django_Pip_Divio - Fatal编程技术网

Python Aldryn Django与Django版本不兼容

Python Aldryn Django与Django版本不兼容,python,django,pip,divio,Python,Django,Pip,Divio,今天早上,我一直在尝试为我的项目设置Divio Cli环境,但我确实遇到了很多问题,这让我非常恼火。首先,我的pip坏了,无论是原始版本还是pip3。现在,至少pip重新开始尝试并重新安装项目所需的需求,现在我发现了这些问题 我的django项目应该至少在2.2上,否则我需要为1.1重新编写代码。除了使用我根本不使用的虚拟环境之外,还有人能找到解决方案吗 下面是Bash日志 LenovoTP220x Desktop # pip install Django==1.11 Collecting Dj

今天早上,我一直在尝试为我的项目设置Divio Cli环境,但我确实遇到了很多问题,这让我非常恼火。首先,我的pip坏了,无论是原始版本还是pip3。现在,至少pip重新开始尝试并重新安装项目所需的需求,现在我发现了这些问题

我的django项目应该至少在2.2上,否则我需要为1.1重新编写代码。除了使用我根本不使用的虚拟环境之外,还有人能找到解决方案吗

下面是Bash日志

LenovoTP220x Desktop # pip install Django==1.11
Collecting Django==1.11
  Downloading https://files.pythonhosted.org/packages/47/a6/078ebcbd49b19e22fd560a2348cfc5cec9e5dcfe3c4fad8e64c9865135bb/Django-1.11-py2.py3-none-any.whl (6.9MB)
     |████████████████████████████████| 6.9MB 6.5MB/s 
Collecting pytz
  Downloading https://files.pythonhosted.org/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl (509kB)
     |████████████████████████████████| 512kB 3.6MB/s 
ERROR: aldryn-django 1.6.11.1 requires pyOpenSSL, which is not installed.
ERROR: aldryn-django 1.6.11.1 has requirement Django==1.6.11, but you'll have django 1.11 which is incompatible.
Installing collected packages: pytz, Django
Successfully installed Django-1.11 pytz-2019.3
LenovoTP220x Desktop # pip install Django==1.6.11
Collecting Django==1.6.11
  Using cached https://files.pythonhosted.org/packages/80/86/f52eec28e96fb211122424a3db696e7676ad3555c11027afd9fee9bb0d23/Django-1.6.11-py2.py3-none-any.whl
ERROR: aldryn-django 1.6.11.1 requires pyOpenSSL, which is not installed.
ERROR: django-storages 1.7.2 has requirement Django>=1.11, but you'll have django 1.6.11 which is incompatible.
ERROR: aldryn-sites 0.6.0 has requirement Django>=1.11, but you'll have django 1.6.11 which is incompatible.
Installing collected packages: Django
  Found existing installation: Django 1.11
    Uninstalling Django-1.11:
      Successfully uninstalled Django-1.11
Successfully installed Django-1.6.11
LenovoTP220x Desktop # pip recommends
ERROR: unknown command "recommends"
LenovoTP220x Desktop # apt recommends
Usage:  apt recommends [package]
LenovoTP220x Desktop # apt recommends pip
Error: package pip not found in APT cache!
LenovoTP220x Desktop # pip install Django==1.11
Collecting Django==1.11
  Using cached https://files.pythonhosted.org/packages/47/a6/078ebcbd49b19e22fd560a2348cfc5cec9e5dcfe3c4fad8e64c9865135bb/Django-1.11-py2.py3-none-any.whl
Requirement already satisfied: pytz in /usr/local/lib/python3.5/dist-packages (from Django==1.11) (2019.3)
ERROR: aldryn-django 1.6.11.1 requires pyOpenSSL, which is not installed.
ERROR: aldryn-django 1.6.11.1 has requirement Django==1.6.11, but you'll have django 1.11 which is incompatible.
Installing collected packages: Django
  Found existing installation: Django 1.6.11
    Uninstalling Django-1.6.11:
      Successfully uninstalled Django-1.6.11
Successfully installed Django-1.11
LenovoTP220x Desktop # pip install pyOpenSSL
Collecting pyOpenSSL
  Using cached https://files.pythonhosted.org/packages/01/c8/ceb170d81bd3941cbeb9940fc6cc2ef2ca4288d0ca8929ea4db5905d904d/pyOpenSSL-19.0.0-py2.py3-none-any.whl
Requirement already satisfied: six>=1.5.2 in /usr/lib/python3/dist-packages (from pyOpenSSL) (1.10.0)
Collecting cryptography>=2.3
  Downloading https://files.pythonhosted.org/packages/ca/9a/7cece52c46546e214e10811b36b2da52ce1ea7fa203203a629b8dfadad53/cryptography-2.8-cp34-abi3-manylinux2010_x86_64.whl (2.3MB)
     |████████████████████████████████| 2.3MB 4.2MB/s 
Collecting cffi!=1.11.3,>=1.8
  Downloading https://files.pythonhosted.org/packages/a8/8d/986e0c4e2aa3b24db56a0affc50d1a379150e3c4da45d51d549dc2697d53/cffi-1.13.2-cp35-cp35m-manylinux1_x86_64.whl (397kB)
     |████████████████████████████████| 399kB 8.4MB/s 
Collecting pycparser
  Downloading https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz (158kB)
     |████████████████████████████████| 163kB 8.6MB/s 
Building wheels for collected packages: pycparser
  Building wheel for pycparser (setup.py) ... done
  Created wheel for pycparser: filename=pycparser-2.19-py2.py3-none-any.whl size=112043 sha256=ba9d8603f660ccef070cc7eeaa471ae98b9f134393fc9e2400764e5559235ca4
  Stored in directory: /root/.cache/pip/wheels/f2/9a/90/de94f8556265ddc9d9c8b271b0f63e57b26fb1d67a45564511
Successfully built pycparser
ERROR: aldryn-django 1.6.11.1 has requirement Django==1.6.11, but you'll have django 1.11 which is incompatible.
Installing collected packages: pycparser, cffi, cryptography, pyOpenSSL
  Found existing installation: cryptography 1.2.3
    Uninstalling cryptography-1.2.3:
      Successfully uninstalled cryptography-1.2.3
Successfully installed cffi-1.13.2 cryptography-2.8 pyOpenSSL-19.0.0 pycparser-2.19
LenovoTP220x Desktop # pip install Django==1.6.11
Collecting Django==1.6.11
  Using cached https://files.pythonhosted.org/packages/80/86/f52eec28e96fb211122424a3db696e7676ad3555c11027afd9fee9bb0d23/Django-1.6.11-py2.py3-none-any.whl
ERROR: aldryn-sites 0.6.0 has requirement Django>=1.11, but you'll have django 1.6.11 which is incompatible.
ERROR: django-storages 1.7.2 has requirement Django>=1.11, but you'll have django 1.6.11 which is incompatible.
Installing collected packages: Django
  Found existing installation: Django 1.11
    Uninstalling Django-1.11:
      Successfully uninstalled Django-1.11
Successfully installed Django-1.6.11

请澄清您的问题。我不确定Divio CLI可能存在什么问题,但这与您显示的回溯无关。在Divio项目中不需要使用虚拟环境。在Divio项目中安装软件包时,它们安装在容器中。在您自己的环境中运行pip是无法做到这一点的,我认为您正在这样做。