我正在尝试配置我的Django应用程序以部署到Heroku。当我试图使用pipenv lock --verbose
锁定pip文件时,我得到了以下错误,说明我的子依赖项不匹配,找不到celery 4.1.0。错误如下:
Finding the best candidates:
found candidate amqp==2.2.2 (constraint was >=2.1.4,==2.2.2,<3.0)
found candidate anyjson==0.3.3 (constraint was ==0.3.3)
found candidate arrow==0.12.0 (constraint was ==0.12.0)
found candidate beautifulsoup4==4.6.0 (constraint was ==4.6.0)
found candidate billiard==3.5.0.3 (constraint was >=3.5.0.2,==3.5.0.3,<3.6.0)
found candidate blessed==1.14.2 (constraint was ==1.14.2)
found candidate bs4==0.0.1 (constraint was ==0.0.1)
Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Could not find a version that matches celery<4.0,<5.0,==4.1.0,>=3.1.15,>=4.0
当我运行pipenv graph
时,我看到Django celeri和Django cellery beat都使用芹菜作为依赖项
当我有celery 4.1.0时,这些库的依赖项称为celery的旧版本。我假设当我试图锁定我的需求时,这些必须是相同的?我尝试过在网上查找,但找不到解决依赖关系不匹配的方法。我尝试过为celery版本指定*,并尝试通过安装celery 4.1.0安装Django celery和Django celery beat,例如:
pip3 install Django-celery celery>=4.1.0
当我这么做的时候,它只是说它已经安装好了。我还能怎样解决这个问题?我的Pipfile文件看起来像
Pipfile
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[requires]
python_version = "3.6"
[packages]
amqp = "==2.2.2"
anyjson = "==0.3.3"
arrow = "==0.12.0"
beautifulsoup4 = "==4.6.0"
billiard = "==3.5.0.3"
blessed = "==1.14.2"
bs4 = "==0.0.1"
celery = "==4.1.0"
certifi = "==2017.7.27.1"
chardet = "==3.0.4"
click = "==6.7"
dj-database-url = "==0.4.2"
Django = "==2.0"
django-celery = "==3.2.2"
django-celery-beat = "==1.1.0"
django-celery-results = "==1.0.1"
django-heroku = "==0.2.0"
django-picklefield = "==1.0.0"
django-q = "==0.8.1"
django-redis-cache = "==1.7.1"
enum-compat = "==0.0.2"
eventlet = "==0.21.0"
flake8 = "==3.5.0"
greenlet = "==0.4.12"
gunicorn = "==19.7.1"
idna = "==2.6"
itsdangerous = "==0.24"
Jinja2 = "==2.10"
kombu = "==4.1.0"
MarkupSafe = "==1.0"
mccabe = "==0.6.1"
numpy = "==1.13.3"
olefile = "==0.44"
pandas = "==0.21.0"
pew = "==1.1.1"
Pillow = "==4.3.0"
pipenv = "==9.0.0"
psutil= "==5.3.1"
psycopg2 = "==2.7.3.2"
pycodestyle = "==2.3.1"
pycurl = "==7.43.0.1"
pyflakes = "==1.6.0"
python-dateutil = "==2.6.1"
pytz = "==2017.3"
redis = "==2.10.6"
requests = "==2.18.4"
selenium = "==3.7.0"
six = "==1.11.0"
urllib3 = "==1.22"
vine = "==1.1.4"
virtualenv = "==15.1.0"
virtualenv-clone = "==0.2.6"
wcwidth= "==0.1.7"
Werkzeug = "==0.12.2"
whitenoise = "==3.3.1"
[dev-packages]
希望你能帮忙!谢谢!在
不再需要安装
django-celery
才能将celery与django一起使用。卸载它。这会解决你的依赖问题。在从celery docs
相关问题 更多 >
编程相关推荐