win10上未安装yolov3

2024-10-01 19:19:59 发布

您现在位置:Python中文网/ 问答频道 /正文

我想在win 10系统上安装yolov3,安装的环境包括:

numpy>=1.18.2
scipy>=1.4.1
wget>=3.2
seaborn>=0.10.0
tensorflow==2.3.1
tensorflow-gpu==2.3.1
opencv-python==4.1.2.30
tqdm==4.43.0
pandas
awscli
urllib3
mss
keras == 1.2.2
Python 3.7.8 win64
pip version 20.2.4

为什么我不能安装yolov3? 出现了几个错误,例如: 为收集的包构建轮子:numpy

运行pip install yolov3时,系统会给我以下错误(还有很多错误,但我超出了允许的维度):


```

 # pip3 install yolov3

Collecting yolov3
  Using cached yolov3-1.7-py3-none-any.whl (1.5 kB)
    Requirement already satisfied: zipp>=0.5 in c:\users\sfran\pycharmprojects\pythonproject\pythonproject\pythonproject
    \pythonproject\testvhsn\venv\lib\site-packages (from importlib-metadata; python_version markdown>=2.6.8->te
    nsorboard=1.14.0->tensorflow==1.14.0->yolov3) (3.4.0)
    Building wheels for collected packages: numpy
      Building wheel for numpy (setup.py) ... error
      ERROR: Command errored out with exit status 1:
       command: 'c:\users\sfran\pycharmprojects\pythonproject\pythonproject\pythonproject\pythonproject\testvhsn\venv\sc
    ripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sfran\\AppData\\Local\\Temp
    \\pip-install-958of2go\\numpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\sfran\\AppData\\Local\\Temp\\pip-install-958o
    f2go\\numpy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
     '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\sfran\AppData\Local
    \Temp\pip-wheel-dtwl6u5l'
           cwd: C:\Users\sfran\AppData\Local\Temp\pip-install-958of2go\numpy\
      Complete output (238 lines):
      Running from numpy source directory.
      blas_opt_info:
      blas_mkl_info:
      No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
      customize MSVCCompiler
        libraries mkl_rt not found in ['c:\\users\\sfran\\pycharmprojects\\pythonproject\\pythonproject\\pythonproject\\
    pythonproject\\testvhsn\\venv\\lib', 'C:\\']
        NOT AVAILABLE
    
      blis_info:
      No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
      customize MSVCCompiler
        libraries blis not found in ['c:\\users\\sfran\\pycharmprojects\\pythonproject\\pythonproject\\pythonproject\\py
    thonproject\\testvhsn\\venv\\lib', 'C:\\']
        NOT AVAILABLE
  
    ...
    
      C:\Users\sfran\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py:274: UserWarning: Unknown distribution
     option: 'define_macros'
        warnings.warn(msg)
      running bdist_wheel
      running build
      running config_cc
      unifing config_cc, config, build_clib, build_ext, build commands --compiler options
      running config_fc
      unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
      running build_src
      build_src
      building py_modules sources
      creating build
      creating build\src.win-amd64-3.7
      creating build\src.win-amd64-3.7\numpy
      creating build\src.win-amd64-3.7\numpy\distutils
      building library "npymath" sources
      No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualst
    udio.microsoft.com/visual-cpp-build-tools/
      ----------------------------------------
      ERROR: Failed building wheel for numpy
      Running setup.py clean for numpy
      ERROR: Command errored out with exit status 1:
       command: 'c:\users\sfran\pycharmprojects\pythonproject\pythonproject\pythonproject\pythonproject\testvhsn\venv\sc
    ripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sfran\\AppData\\Local\\Temp
    \\pip-install-958of2go\\numpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\sfran\\AppData\\Local\\Temp\\pip-install-958o
    f2go\\numpy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
     '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
           cwd: C:\Users\sfran\AppData\Local\Temp\pip-install-958of2go\numpy
      Complete output (10 lines):
      Running from numpy source directory.
    
      `setup.py clean` is not supported, use one of the following instead:
    
        - `git clean -xdf` (cleans all files)
        - `git clean -Xdf` (cleans all versioned files, doesn't touch
                            files that aren't checked into the git repo)
    
      Add `--force` to your command to use it anyway if you must (unsupported).
    
      ----------------------------------------
      ERROR: Failed cleaning build dir for numpy
    Failed to build numpy
    Installing collected packages: numpy, opencv-python, Keras, keras-applications, tensorboard, tensorflow-estimator, t
    ensorflow, yolov3
      Attempting uninstall: numpy
        Found existing installation: numpy 1.19.4
        Uninstalling numpy-1.19.4:
          Successfully uninstalled numpy-1.19.4
        Running setup.py install for numpy ... error
        ERROR: Command errored out with exit status 1:
         command: 'c:\users\sfran\pycharmprojects\pythonproject\pythonproject\pythonproject\pythonproject\testvhsn\venv\
    scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sfran\\AppData\\Local\\Te
    mp\\pip-install-958of2go\\numpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\sfran\\AppData\\Local\\Temp\\pip-install-95
    8of2go\\numpy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"
    ', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\sfran\AppData\L
    ocal\Temp\pip-record-6o8tmn9q\install-record.txt' --single-version-externally-managed --compile --install-headers 'c
    :\users\sfran\pycharmprojects\pythonproject\pythonproject\pythonproject\pythonproject\testvhsn\venv\include\site\pyt
    hon3.7\numpy'
             cwd: C:\Users\sfran\AppData\Local\Temp\pip-install-958of2go\numpy\
        Complete output (243 lines):
        Running from numpy source directory.
    
        Note: if you need reliable uninstall behavior, then install
        with pip instead of using `setup.py install`:
    
          - `pip install .`       (from a git repo or downloaded source
                                   release)
          - `pip install numpy`   (last NumPy release on PyPi)
    
    
        blas_opt_info:
        blas_mkl_info:
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries mkl_rt not found in ['c:\\users\\sfran\\pycharmprojects\\pythonproject\\pythonproject\\pythonproject
    \\pythonproject\\testvhsn\\venv\\lib', 'C:\\']
          NOT AVAILABLE
    
        blis_info:
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries blis not found in ['c:\\users\\sfran\\pycharmprojects\\pythonproject\\pythonproject\\pythonproject\\
    pythonproject\\testvhsn\\venv\\lib', 'C:\\']
          NOT AVAILABLE
    
        openblas_info:
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries openblas not found in ['c:\\users\\sfran\\pycharmprojects\\pythonproject\\pythonproject\\pythonproje
    ct\\pythonproject\\testvhsn\\venv\\lib', 'C:\\']
        get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intel
    vem', 'intelem', 'flang']'
        customize GnuFCompiler
        Could not locate executable g77
        Could not locate executable f77
          NOT AVAILABLE
    
         C:\Users\sfran\AppData\Local\Temp\pip-install-958of2go\numpy\numpy\distutils\system_info.py:624: UserWarning:
            Blas (http://www.netlib.org/blas/) libraries not found.
            Directories to search for the libraries can be specified in the
            numpy/distutils/site.cfg file (section [blas]) or by setting
            the BLAS environment variable.
          self.calc_info()
        blas_src_info:
          NOT AVAILABLE
    
        C:\Users\sfran\AppData\Local\Temp\pip-install-958of2go\numpy\numpy\distutils\system_info.py:624: UserWarning:
            Blas (http://www.netlib.org/blas/) sources not found.
            Directories to search for the sources can be specified in the
            numpy/distutils/site.cfg file (section [blas_src]) or by setting
            the BLAS_SRC environment variable.
          self.calc_info()
          NOT AVAILABLE
    
        "svnversion" non Š riconosciuto come comando interno o esterno,
         un programma eseguibile o un file batch.
        "svnversion" non Š riconosciuto come comando interno o esterno,
         un programma eseguibile o un file batch.
        non-existing path in 'numpy\\distutils': 'site.cfg'
        F2PY Version 2
        lapack_opt_info:
        lapack_mkl_info:
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries mkl_rt not found in ['c:\\users\\sfran\\pycharmprojects\\pythonproject\\pythonproject\\pythonproject
    \\pythonproject\\testvhsn\\venv\\lib', 'C:\\']
          NOT AVAILABLE
    
        openblas_lapack_info:
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries openblas not found in ['c:\\users\\sfran\\pycharmprojects\\pythonproject\\pythonproject\\pythonproje
    ct\\pythonproject\\testvhsn\\venv\\lib', 'C:\\']
          NOT AVAILABLE
    
        openblas_clapack_info:
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries openblas,lapack not found in ['c:\\users\\sfran\\pycharmprojects\\pythonproject\\pythonproject\\pyth
    onproject\\pythonproject\\testvhsn\\venv\\lib', 'C:\\']
          NOT AVAILABLE
    
        atlas_3_10_threads_info:
        Setting PTATLAS=ATLAS
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries tatlas,tatlas not found in c:\users\sfran\pycharmprojects\pythonproject\pythonproject\pythonproject\
    pythonproject\testvhsn\venv\lib
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries lapack_atlas not found in c:\users\sfran\pycharmprojects\pythonproject\pythonproject\pythonproject\p
    ythonproject\testvhsn\venv\lib
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries tatlas,tatlas not found in C:\
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries lapack_atlas not found in C:\
        
          NOT AVAILABLE
    
        atlas_3_10_info:
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries satlas,satlas not found in c:\users\sfran\pycharmprojects\pythonproject\pythonproject\pythonproject\
    pythonproject\testvhsn\venv\lib
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries lapack_atlas not found in c:\users\sfran\pycharmprojects\pythonproject\pythonproject\pythonproject\p
    ythonproject\testvhsn\venv\lib
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries satlas,satlas not found in C:\
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries lapack_atlas not found in C:\
        
          NOT AVAILABLE
    
        atlas_threads_info:
        Setting PTATLAS=ATLAS
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries ptf77blas,ptcblas,atlas not found in c:\users\sfran\pycharmprojects\pythonproject\pythonproject\pyth
    onproject\pythonproject\testvhsn\venv\lib
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries lapack_atlas not found in c:\users\sfran\pycharmprojects\pythonproject\pythonproject\pythonproject\p
    ythonproject\testvhsn\venv\lib
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries ptf77blas,ptcblas,atlas not found in C:\
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries lapack_atlas not found in C:\
        
          NOT AVAILABLE
    
        atlas_info:
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries f77blas,cblas,atlas not found in c:\users\sfran\pycharmprojects\pythonproject\pythonproject\pythonpr
    oject\pythonproject\testvhsn\venv\lib
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries lapack_atlas not found in c:\users\sfran\pycharmprojects\pythonproject\pythonproject\pythonproject\p
    ythonproject\testvhsn\venv\lib
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries f77blas,cblas,atlas not found in C:\
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries lapack_atlas not found in C:\
        
          NOT AVAILABLE
    
        lapack_info:
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        customize MSVCCompiler
          libraries lapack not found in ['c:\\users\\sfran\\pycharmprojects\\pythonproject\\pythonproject\\pythonproject
    \\pythonproject\\testvhsn\\venv\\lib', 'C:\\']
          NOT AVAILABLE
    
        C:\Users\sfran\AppData\Local\Temp\pip-install-958of2go\numpy\numpy\distutils\system_info.py:624: UserWarning:
            Lapack (http://www.netlib.org/lapack/) libraries not found.
            Directories to search for the libraries can be specified in the
            numpy/distutils/site.cfg file (section [lapack]) or by setting
            the LAPACK environment variable.
          self.calc_info()
        lapack_src_info:
          NOT AVAILABLE
    
        C:\Users\sfran\AppData\Local\Temp\pip-install-958of2go\numpy\numpy\distutils\system_info.py:624: UserWarning:
            Lapack (http://www.netlib.org/lapack/) sources not found.
            Directories to search for the sources can be specified in the
            numpy/distutils/site.cfg file (section [lapack_src]) or by setting
            the LAPACK_SRC environment variable.
          self.calc_info()
          NOT AVAILABLE
    
        C:\Users\sfran\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py:274: UserWarning: Unknown distributi
    on option: 'define_macros'
          warnings.warn(msg)
        running install
        running build
        running config_cc
        unifing config_cc, config, build_clib, build_ext, build commands --compiler options
        running config_fc
        unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
        running build_src
        build_src
        building py_modules sources
        building library "npymath" sources
        No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
        error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visual studio.microsoft.com/visual-cpp-build-tools/


**What is going on here?**

(I would like to understand how something can fail?)
Whats the problem? please help

Tags: noinfromnumpylibrariesnotnamedmodule
1条回答
网友
1楼 · 发布于 2024-10-01 19:19:59

错误似乎是:

Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

<微软上是否安装了Visual C++ 14或更大版本?一旦你有,请设置环境路径,并尝试再次安装yolov3

相关问题 更多 >

    热门问题