MMtrack 安装出现问题,请友友们帮我解决一下
DEPRECATION: Loading egg at c:\users\hu186\.conda\envs\vit-adaper\lib\site-packages\fonttools-4.42.1-py3.11.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package install
ation..
DEPRECATION: Loading egg at c:\users\hu186\.conda\envs\vit-adaper\lib\site-packages\mmdet-3.1.0-py3.11.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package installation
..
Collecting mmtrack
Using cached mmtrack-0.14.0-py3-none-any.whl (400 kB)
Collecting attributee (from mmtrack)
Using cached attributee-0.1.8.tar.gz (11 kB)
Preparing metadata (setup.py) ... done
Collecting dotty-dict (from mmtrack)
Using cached dotty_dict-1.3.1-py3-none-any.whl (7.0 kB)
Collecting lap (from mmtrack)
Using cached lap-0.4.0.tar.gz (1.5 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: matplotlib in c:\users\hu186\.conda\envs\vit-adaper\lib\site-packages (from mmtrack) (3.7.2)
Collecting mmcls<1.0.0,>=0.16.0 (from mmtrack)
Using cached mmcls-0.25.0-py2.py3-none-any.whl (648 kB)
Collecting motmetrics (from mmtrack)
Using cached motmetrics-1.4.0-py3-none-any.whl (161 kB)
Requirement already satisfied: packaging in c:\users\hu186\appdata\roaming\python\python311\site-packages (from mmtrack) (23.1)
Collecting pandas<=1.3.5 (from mmtrack)
Using cached pandas-1.3.5.tar.gz (4.7 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: pycocotools in c:\users\hu186\.conda\envs\vit-adaper\lib\site-packages (from mmtrack) (2.0.6)
Collecting scipy<=1.7.3 (from mmtrack)
Using cached scipy-1.6.1.tar.gz (27.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [153 lines of output]
setup.py:461: UserWarning: Unrecognized setuptools command ('dist_info --egg-base C:\Users\hu186\AppData\Local\Temp\pip-modern-metadata-l9giqjd5'), proceeding with generating Cython sources and expanding templates
warnings.warn("Unrecognized setuptools command ('{}'), proceeding with "
setup.py:563: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
from numpy.distutils.core import setup
Running from SciPy source directory.
INFO: lapack_opt_info:
INFO: lapack_armpl_info:
INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
INFO: customize MSVCCompiler
INFO: libraries armpl_lp64_mp not found in ['C:\\Users\\hu186\\.conda\\envs\\VIT-adaper\\lib', 'C:\\', 'C:\\Users\\hu186\\.conda\\envs\\VIT-adaper\\libs', 'B:\\Anaconda\\Library\\lib']
INFO: NOT AVAILABLE
INFO:
INFO: lapack_mkl_info:
INFO: libraries mkl_rt not found in ['C:\\Users\\hu186\\.conda\\envs\\VIT-adaper\\lib', 'C:\\', 'C:\\Users\\hu186\\.conda\\envs\\VIT-adaper\\libs', 'B:\\Anaconda\\Library\\lib']
INFO: NOT AVAILABLE
INFO:
INFO: lapack_ssl2_info:
INFO: libraries fjlapackexsve not found in ['C:\\Users\\hu186\\.conda\\envs\\VIT-adaper\\lib', 'C:\\', 'C:\\Users\\hu186\\.conda\\envs\\VIT-adaper\\libs', 'B:\\Anaconda\\Library\\lib']
INFO: NOT AVAILABLE
INFO:
INFO: openblas_lapack_info:
INFO: libraries openblas not found in ['C:\\Users\\hu186\\.conda\\envs\\VIT-adaper\\lib', 'C:\\', 'C:\\Users\\hu186\\.conda\\envs\\VIT-adaper\\libs', 'B:\\Anaconda\\Library\\lib']
INFO: get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
INFO: customize GnuFCompiler
WARN: Could not locate executable g77
WARN: Could not locate executable f77
INFO: customize IntelVisualFCompiler
WARN: Could not locate executable ifort
WARN: Could not locate executable ifl
INFO: customize AbsoftFCompiler
WARN: Could not locate executable f90
INFO: customize CompaqVisualFCompiler
WARN: Could not locate executable DF
INFO: customize IntelItaniumVisualFCompiler
WARN: Could not locate executable efl
INFO: customize Gnu95FCompiler
WARN: Could not locate executable gfortran
WARN: Could not locate executable f95
INFO: customize G95FCompiler
WARN: Could not locate executable g95
INFO: customize IntelEM64VisualFCompiler
INFO: customize IntelEM64TFCompiler
WARN: Could not locate executable efort
WARN: Could not locate executable efc
INFO: customize PGroupFlangCompiler
WARN: Could not locate executable flang
WARN: don't know how to compile Fortran code on platform 'nt'
INFO: NOT AVAILABLE
INFO:
INFO: openblas_clapack_info:
INFO: libraries openblas,lapack not found in ['C:\\Users\\hu186\\.conda\\envs\\VIT-adaper\\lib', 'C:\\', 'C:\\Users\\hu186\\.conda\\envs\\VIT-adaper\\libs', 'B:\\Anaconda\\Library\\lib']
INFO: NOT AVAILABLE
INFO:
INFO: flame_info:
INFO: libraries flame not found in ['C:\\Users\\hu186\\.conda\\envs\\VIT-adaper\\lib', 'C:\\', 'C:\\Users\\hu186\\.conda\\envs\\VIT-adaper\\libs', 'B:\\Anaconda\\Library\\lib']
INFO: NOT AVAILABLE
INFO:
INFO: accelerate_info:
INFO: NOT AVAILABLE
INFO:
INFO: atlas_3_10_threads_info:
INFO: Setting PTATLAS=ATLAS
INFO: libraries tatlas,tatlas not found in C:\Users\hu186\.conda\envs\VIT-adaper\lib
INFO: libraries tatlas,tatlas not found in C:\
INFO: libraries tatlas,tatlas not found in C:\Users\hu186\.conda\envs\VIT-adaper\libs
INFO: libraries tatlas,tatlas not found in B:\Anaconda\Library\lib
INFO: <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
INFO: NOT AVAILABLE
INFO:
INFO: atlas_3_10_info:
INFO: libraries satlas,satlas not found in C:\Users\hu186\.conda\envs\VIT-adaper\lib
INFO: libraries satlas,satlas not found in C:\
INFO: libraries satlas,satlas not found in C:\Users\hu186\.conda\envs\VIT-adaper\libs
INFO: libraries satlas,satlas not found in B:\Anaconda\Library\lib
INFO: <class 'numpy.distutils.system_info.atlas_3_10_info'>
INFO: NOT AVAILABLE
INFO:
INFO: atlas_threads_info:
INFO: Setting PTATLAS=ATLAS
INFO: libraries ptf77blas,ptcblas,atlas not found in C:\Users\hu186\.conda\envs\VIT-adaper\lib
INFO: libraries ptf77blas,ptcblas,atlas not found in C:\
INFO: libraries ptf77blas,ptcblas,atlas not found in C:\Users\hu186\.conda\envs\VIT-adaper\libs
INFO: libraries ptf77blas,ptcblas,atlas not found in B:\Anaconda\Library\lib
INFO: <class 'numpy.distutils.system_info.atlas_threads_info'>
INFO: NOT AVAILABLE
INFO:
INFO: atlas_info:
INFO: libraries f77blas,cblas,atlas not found in C:\Users\hu186\.conda\envs\VIT-adaper\lib
INFO: libraries f77blas,cblas,atlas not found in C:\
INFO: libraries f77blas,cblas,atlas not found in C:\Users\hu186\.conda\envs\VIT-adaper\libs
INFO: libraries f77blas,cblas,atlas not found in B:\Anaconda\Library\lib
INFO: <class 'numpy.distutils.system_info.atlas_info'>
INFO: NOT AVAILABLE
INFO:
INFO: lapack_info:
INFO: libraries lapack not found in ['C:\\Users\\hu186\\.conda\\envs\\VIT-adaper\\lib', 'C:\\', 'C:\\Users\\hu186\\.conda\\envs\\VIT-adaper\\libs', 'B:\\Anaconda\\Library\\lib']
INFO: NOT AVAILABLE
INFO:
C:\Users\hu186\AppData\Local\Temp\pip-build-env-3tzw_lrl\overlay\Lib\site-packages\numpy\distutils\system_info.py:1974: 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.
return getattr(self, '_calc_info_{}'.format(name))()
INFO: lapack_src_info:
INFO: NOT AVAILABLE
INFO:
C:\Users\hu186\AppData\Local\Temp\pip-build-env-3tzw_lrl\overlay\Lib\site-packages\numpy\distutils\system_info.py:1974: 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.
return getattr(self, '_calc_info_{}'.format(name))()
INFO: NOT AVAILABLE
INFO:
Traceback (most recent call last):
File "C:\Users\hu186\.conda\envs\VIT-adaper\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Users\hu186\.conda\envs\VIT-adaper\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hu186\.conda\envs\VIT-adaper\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 149, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hu186\AppData\Local\Temp\pip-build-env-3tzw_lrl\overlay\Lib\site-packages\setuptools\build_meta.py", line 161, in prepare_metadata_for_build_wheel
self.run_setup()
File "C:\Users\hu186\AppData\Local\Temp\pip-build-env-3tzw_lrl\overlay\Lib\site-packages\setuptools\build_meta.py", line 254, in run_setup
self).run_setup(setup_script=setup_script)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hu186\AppData\Local\Temp\pip-build-env-3tzw_lrl\overlay\Lib\site-packages\setuptools\build_meta.py", line 145, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 588, in <module>
setup_package()
File "setup.py", line 584, in setup_package
setup(**metadata)
File "C:\Users\hu186\AppData\Local\Temp\pip-build-env-3tzw_lrl\overlay\Lib\site-packages\numpy\distutils\core.py", line 135, in setup
config = configuration()
^^^^^^^^^^^^^^^
File "setup.py", line 499, in configuration
raise NotFoundError(msg)
numpy.distutils.system_info.NotFoundError: No BLAS/LAPACK libraries found.
To build Scipy from sources, BLAS & LAPACK libraries need to be installed.
See site.cfg.example in the Scipy source directory and
https://docs.scipy.org/doc/scipy/reference/building/index.html for details.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
援引讯飞星湖哦:
从错误日志来看,问题出在pyproject.toml
文件的生成过程中。有一些依赖库没有找到,例如numpy.distutils._msvccompiler
、lapack_mkl_info
、lapack_ssl2_info
等。这可能是由于这些库在你的计算机上没有安装或者版本不匹配导致的。
首先,确保你已经安装了所有必要的依赖库。你可以尝试使用以下命令来安装缺失的库:
pip install numpy
pip install openblas
pip install mkl
pip install scipy
如果问题仍然存在,你可以尝试降低mmtrack
和mmcls
的版本,以确保它们与你的Python环境兼容。你可以在requirements.txt
文件中指定特定版本的库,例如:
mmtrack==0.14.0
mmcls==0.25.0
然后再次运行pip install -r requirements.txt
来安装指定版本的库。
希望这些建议能帮助你解决问题!
该回答通过自己思路及引用到GPTᴼᴾᴱᴺᴬᴵ搜索,得到内容具体如下:
从错误日志来看,问题出在numpy.distutils
的安装过程中。有一些依赖库没有找到,例如lapack_mkl_info
、lapack_ssl2_info
、openblas_lapack_info
等。这可能是因为这些库没有被正确安装或者版本不兼容。
首先,确保你已经安装了Microsoft Visual C++ 14.0
。你可以从这里下载并安装:https://visualstudio.microsoft.com/visual-cpp-build-tools/
然后,尝试更新pip
和setuptools
到最新版本:
pip install --upgrade pip setuptools
接下来,尝试重新安装mmtrack
:
pip install mmtrack
如果问题仍然存在,你可以尝试创建一个虚拟环境,然后在虚拟环境中安装mmtrack
:
python -m venv myenv
myenv\Scripts\activate
pip install mmtrack
希望这些方法能帮助你解决问题。
如果以上回答对您有所帮助,点击一下采纳该答案~谢谢
引用 皆我百晓生 小程序回复内容作答:
根据您提供的错误信息,问题出现在安装 mmtrack
时无法生成元数据。错误提示指出缺少 BLAS/LAPACK 库,而这些库是构建 Scipy 所需。以下是一些可能的解决方案:
确保您已安装了依赖的 BLAS/LAPACK 库。可以尝试使用 conda 或 pip 安装这些库。安装命令如下:
conda install -c conda-forge mkl
或者
pip install mkl
如果您已经安装了 BLAS/LAPACK 库,但仍然遇到此错误,请检查库的版本是否与 mmtrack
所需的版本兼容。您可以尝试升级或降级这些库的版本。
请确保您的 Python 环境正常运行,没有任何其他错误或冲突。
您还可以尝试通过使用 --no-cache-dir
选项来重新安装 mmtrack
,这将避免使用缓存:
pip install --no-cache-dir mmtrack
如果上述解决方案仍未能解决问题,请提供更多关于您的环境和安装过程的详细信息,以便我们更好地理解问题并为您提供更准确的帮助。
【相关推荐】
假使定义的runner属于epoch_based_runner,在下图的epoch_based_runner中可以查看到,epoch_based_runner中定义的train函数中调用了model的train方法,但是model的train方法一直是冻结网络参数,因此可以再定义一个train_unfrozen方法,设置结构的required_grad=True。
并且在epoch_based_runner中的train方法中根据self.epoch传入epoch_runner中,选择调用model.train()还是model.train_unfrozen()。
【mmdetection 类别出错问题+训练+测试 - CSDN App】http://t.csdn.cn/AQivw
根据 MMTrack 的官方文档,MMTrack 推荐使用 Python 3.7 。
安装的参考链接
https://mmtracking.readthedocs.io/zh_CN/latest/install.html#id4
以下是基于 conda 安装 MMTracking 的脚本
conda create -n open-mmlab python=3.7 -y
conda activate open-mmlab
conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.1 -c pytorch -y
pip install git+https://gitee.com/git437730201/toolkit.git(可选)
# 安装最新版本的 mmcv
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.6.0/index.html
# 安装 mmdetection
pip install mmdet
# 安装 mmtracking
git clone https://gitee.com/git437730201/mmtracking.git
cd mmtracking
pip install -r requirements/build.txt
pip install -v -e .
pip install git+https://gitee.com/git437730201/TrackEval.git
pip install git+https://gitee.com/git437730201/lvis-api.git
pip install git+https://gitee.com/git437730201/tao.git
使用 Conda 安装 BLAS/LAPACK:使用 Conda 包管理器安装 BLAS 和 LAPACK 库,然后再尝试安装 mmtrack。可以使用以下命令来安装 BLAS 和 LAPACK:
conda install -c anaconda blas
conda install -c anaconda lapack
目测缺包吧
OpenMMLab MMTracking目标跟踪环境搭建(一)
可以参考下
结合GPT给出回答如下请题主参考
首先,需要先确认您的操作系统和Python版本是否满足MMdetection和MMtrack的要求。建议使用Ubuntu 16.04或18.04,并使用Python 3.6或更高版本。
其次,建议使用conda或虚拟环境来安装MMdetection和MMtrack,并按照官方文档中的指南进行安装,并进行必要的配置。
如有问题,可以提供更具体的错误信息和操作步骤,以便我们更好地帮助您解决问题。