美文网首页
2020-12-15

2020-12-15

作者: 你的昵称是X | 来源:发表于2020-12-15 09:58 被阅读0次


    mac 下安装 opencv-python

    通过如下命令:    pip install opencv-python  -i https://pypi.tuna.tsinghua.edu.cn/simple 

    实现快速下载,然鹅。。。随后显示:

    Getting requirements to build wheel ... error

    无奈之下,改用conda 来安装,但用命令:

    conda install -c menpo opencv后弹出:

    The following specifications were found

    to be incompatible with the existing python installation in your environment:

    Specifications:

      - opencv -> python[version='2.7.*|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0|>=3.7,<3.8.0a0|>=2.7,<2.8.0a0']

    Your python: python=3.8

    If python is on the left-most side of the chain, that's the version you've asked for.

    When python appears to the right, that indicates that the thing on the left is somehow

    not available for the python version you are constrained to. Note that conda will not

    change your python version to a different minor version unless you explicitly specify

    that.

    查看网上各种教程,试过一遍后发现,以下方案可行:

    conda deactivate

    conda create -y -n rna3.5 python=3.5

    conda activate rna3.5

    conda install -c menpo opencv3

    我打算在jupyter note book 上使用opencv

    但在导入时报错,查看网上教程说“

    这种情况下需要在anaconda navigator 上进行如下操作:

    -->点击左侧“Environments”

    --> 右侧窗口上方第一个下拉框选择“Not installed”

    --> 在列表中找到“opencv”并勾选

    -->点击右下方绿色按钮“Apply”

    终于搞定!感谢国内外网友指点!

    相关文章

      网友评论

          本文标题:2020-12-15

          本文链接:https://www.haomeiwen.com/subject/vbbigktx.html