【问题标题】:tensorflow 2.4.1 requires six~=1.15.0, but you have six 1.16.0 which is incompatibletensorflow 2.4.1 需要六个~=1.15.0,但是你有六个不兼容的 1.16.0
【发布时间】:2021-12-29 00:47:43
【问题描述】:

我收到此错误:-

    [31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
104 1m 15s  tensorflow 2.4.1 requires six~=1.15.0, but you have six 1.16.0 which is incompatible.[

当我尝试在我的客户环境中导入包 Torch 和数据集以进行拥抱脸摘要时。

pandas
numpy
torch
datasets==1.14.0
transformers==4.11.3
rouge-score==0.0.4
nltk==3.6.5
pyarrow==6.0.0

beautifulsoup4==4.10.0
numpy
pandas
lxml
requests==2.23.0
wikipedia==1.4.0

这些是我作为要求提供的包。莫非其中之一是安装 Six=1.16 和卸载 Six=1.15?

这里是日志的更多细节

Downloading cnvrg-0.7.51-py3-none-any.whl (78 kB)
24  5m 22s  [?25l
25  5m 22s  [?25hRequirement already satisfied: six in /usr/local/lib/python3.6/dist-packages (1.15.0)
26  5m 22s  Collecting six
27  5m 22s  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
[?25l

Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /usr/local/lib/python3.6/dist-packages (from pyasn1-modules>=0.2.1->google-auth<2.0dev,>=1.11.0->google-cloud-storage->cnvrg) (0.4.8)
83  5m 22s  Requirement already satisfied: PyYAML in /usr/local/lib/python3.6/dist-packages (from pyaml->cnvrg) (5.4.1)
84  5m 22s  Installing collected packages: six, urllib3, requests, azure-core, azure-storage-blob, cnvrg
85  5m 22s  Attempting uninstall: six
86  5m 22s  Found existing installation: six 1.15.0
87  5m 22s  Uninstalling six-1.15.0:
88  5m 22s  Successfully uninstalled six-1.15.0

最终,这个错误不允许我同时导入 Torch 和数据集。

谁能帮忙解决这个问题

【问题讨论】:

    标签: python tensorflow compiler-errors pytorch runtime-error


    【解决方案1】:

    安装完所有依赖后,安装six 1.15.0

    pip install -r requirements.txt
    

    然后运行

    pip install six~=1.15.0 
    

    pip install six==1.15.0 
    

    【讨论】:

    • 环境使用 requirements.txt 文件安装包,pip 在那里不起作用
    • 你在使用 conda 吗?如果是,您仍然可以使用 pip。
    猜你喜欢
    • 2020-02-21
    • 1970-01-01
    • 2023-03-27
    • 1970-01-01
    • 2023-03-07
    • 1970-01-01
    • 2022-12-19
    • 2021-05-18
    • 1970-01-01
    相关资源
    最近更新 更多