首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法将所需的依赖项安装到Conda环境中。

无法将所需的依赖项安装到Conda环境中。
EN

Stack Overflow用户
提问于 2022-08-08 20:36:14
回答 1查看 102关注 0票数 1

我输入的命令是"python3 -m pip install -r requirements.txt“。

我认为第一个错误是缺少了库mkl_rt,但我不知道如何添加。

完整日志:

代码语言:javascript
复制
Defaulting to user installation because normal site-packages is not writeable
Collecting Flask==1.1.1
  Using cached Flask-1.1.1-py2.py3-none-any.whl (94 kB)
Collecting imutils==0.5.3
  Using cached imutils-0.5.3.tar.gz (17 kB)
  Preparing metadata (setup.py) ... done
Collecting Keras==2.4.0
  Using cached Keras-2.4.0-py2.py3-none-any.whl (170 kB)
Collecting opencv-python==4.4.0.46
  Using cached opencv-python-4.4.0.46.tar.gz (88.9 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [4837 lines of output]
      Ignoring numpy: markers 'python_version == "3.6"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.7"' don't match your environment
      Ignoring numpy: markers 'python_version >= "3.9"' don't match your environment
      Collecting setuptools
        Using cached setuptools-63.4.2-py3-none-any.whl (1.2 MB)
      Collecting wheel
        Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
      Collecting scikit-build
        Using cached scikit_build-0.15.0-py2.py3-none-any.whl (77 kB)
      Collecting cmake
        Using cached cmake-3.24.0-py2.py3-none-macosx_10_10_universal2.macosx_10_10_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl (77.9 MB)
      Collecting pip
        Using cached pip-22.2.2-py3-none-any.whl (2.0 MB)
      Collecting numpy==1.17.3
        Using cached numpy-1.17.3.zip (6.4 MB)
        Preparing metadata (setup.py): started
        Preparing metadata (setup.py): finished with status 'done'
      Collecting distro
        Using cached distro-1.7.0-py3-none-any.whl (20 kB)
      Collecting packaging
        Using cached packaging-21.3-py3-none-any.whl (40 kB)
      Collecting pyparsing!=3.0.5,>=2.0.2
        Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
      Building wheels for collected packages: numpy
        Building wheel for numpy (setup.py): started
        Building wheel for numpy (setup.py): finished with status 'error'
        error: subprocess-exited-with-error
      
        × python setup.py bdist_wheel did not run successfully.
        │ exit code: 1
        ╰─> [4428 lines of output]
            Running from numpy source directory.
            blas_opt_info:
            blas_mkl_info:
            customize UnixCCompiler
              libraries mkl_rt not found in ['/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib', '/usr/lib']
              NOT AVAILABLE



..............

现在,我将尝试在没有文件的情况下安装这些需求。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-08-09 07:35:06

当python和/or pip的版本与要安装的包的版本之间存在问题时,就会发生此错误。

如果您知道用于生成requirements.txt文件的python版本,请确保使用相同的版本。否则,尝试升级python的版本。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73283740

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档