【问题标题】:How can i be stuck with such a compatibility mismatch ? python-dateutil我怎么会被这种兼容性不匹配所困扰? python-dateutil
【发布时间】:2019-10-16 13:23:15
【问题描述】:

我正在开发一个包含 boto 3 的 django 应用程序; botocore(用于 aws s3 连接)、pandas(我想自动包含在 django 中)和 heroku(等等) 这是我的问题: - botocore 1.12.250 有要求 python-dateutil=2.5.0 - heroku 0.24.2 有要求 python-dateutil>==1.5

都是最新的升级版本。 由于我是初学者,我不敢相信没有人同时使用 heroku 和 boto 3,或者 heroku 和 pandas - 它们很受欢迎! 有人如何同时使用 heroku pip 和 pandas 或 boto ?

因此我无法锁定我的环境,也无法推送到 heroku...

这是我的 requirements.txt :

astroid==2.2.5
boto3==1.9.250
botocore==1.12.250
certifi==2019.6.16
chardet==3.0.4
colorama==0.4.1
dj-database-url==0.5.0
Django==2.2.6
django-autoslug==1.9.6
django-ckeditor==5.7.1
django-csvimport==2.12
django-heroku==0.3.1
django-isbn-field==0.5.2
django-js-asset==1.2.2
django-storages==1.7.2
docutils==0.15.2
gunicorn==19.9.0
heroku==0.1.4
html5lib==1.0.1
idna==2.8
isort==4.3.21
jmespath==0.9.4
json-table-schema==0.2.1
lazy-object-proxy==1.4.1
lxml==4.3.4
mccabe==0.6.1
messytables==0.15.2
numpy==1.16.4
pandas==0.24.2
Pillow==6.0.0
pipenv==2018.11.26
psycopg2==2.8.3
pylint==2.3.1
python-dateutil==1.5
python-magic==0.4.15
python-magic-bin==0.4.14
python-stdnum==1.11
pytz==2019.3
requests==2.22.0
s3transfer==0.2.1
six==1.12.0
SQLAlchemy==1.3.5
sqlparse==0.3.0
typed-ast==1.4.0
Unidecode==1.1.1
urllib3==1.25.3
virtualenv==16.6.1
virtualenv-clone==0.5.3
webencodings==0.5.1
wrapt==1.11.2
xlrd==1.2.0

在这种情况下,我将 python-dateutil 强制为 1.5,然后在锁定 pipenv 时出现此错误:

ERROR: botocore 1.12.250 has requirement python-dateutil<3.0.0,>=2.1; 
python_version >= "2.7", but you'll have python-dateutil 1.5 which is 
incompatible.
ERROR: pandas 0.24.2 has requirement python-dateutil>=2.5.0, but you'll 
have python-dateutil 1.5 which is incompatible.

当我修改到最新版本的 python-date-util 时,我得到了 锁定 pipenv 时出现反向错误:

ERROR: heroku 0.1.4 has requirement python-dateutil==1.5 , but you'll 
have python-dateutil 2.8 which is incompatible.

我想避免与所需和必需的软件包不匹配。 感谢您的帮助,我已经坚持了好几个小时了。

【问题讨论】:

    标签: python heroku python-dateutil


    【解决方案1】:

    heroku 0.1.4 已弃用,如本页顶部所述:

    https://github.com/heroku/heroku.py

    尝试按照this suggestion 使用社区支持的heroku3 包,它具有更现代的依赖项。

    【讨论】:

    • 谢谢 Rob,我看到了这个答案,但它不是由 heroku 团队开发的,所有命令都不同。关于这个包的文档不多,我不确定它是否可靠......
    【解决方案2】:

    上面提到的 pip 包似乎已被弃用。您应该将其从您的 requirements.txt 中删除,因为您可能已通过以下方式将其安装为系统包:

    https://devcenter.heroku.com/articles/heroku-cli

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多