错误:pycortex 构建轮子失败

问题描述 投票:0回答:1

我正在尝试安装 pycortex,但由于某种原因它无法为包构建轮子。我已经安装了 Microsoft C++ 工具,并且还创建了一个运行与 numpy.distutils 兼容的包的环境,但我仍然无法让它工作。这是错误消息。

    `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


  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win32-cpython-310
  creating build\lib.win32-cpython-310\cortex
  copying cortex\align.py -> build\lib.win32-cpython-310\cortex
  copying cortex\anat.py -> build\lib.win32-cpython-310\cortex
  copying cortex\appdirs.py -> build\lib.win32-cpython-310\cortex
  copying cortex\brainctm.py -> build\lib.win32-cpython-310\cortex
  copying cortex\database.py -> build\lib.win32-cpython-310\cortex
  copying cortex\fmriprep.py -> build\lib.win32-cpython-310\cortex
  copying cortex\formats_old.py -> build\lib.win32-cpython-310\cortex
  copying cortex\freesurfer.py -> build\lib.win32-cpython-310\cortex
  copying cortex\mayavi_aligner.py -> build\lib.win32-cpython-310\cortex
  copying cortex\mni.py -> build\lib.win32-cpython-310\cortex
  copying cortex\mp.py -> build\lib.win32-cpython-310\cortex
  copying cortex\options.py -> build\lib.win32-cpython-310\cortex
  copying cortex\rois.py -> build\lib.win32-cpython-310\cortex
  copying cortex\segment.py -> build\lib.win32-cpython-310\cortex
  copying cortex\surfinfo.py -> build\lib.win32-cpython-310\cortex
  copying cortex\svgoverlay.py -> build\lib.win32-cpython-310\cortex
  copying cortex\testing_utils.py -> build\lib.win32-cpython-310\cortex
  copying cortex\utils.py -> build\lib.win32-cpython-310\cortex
  copying cortex\version.py -> build\lib.win32-cpython-310\cortex
  copying cortex\volume.py -> build\lib.win32-cpython-310\cortex
  copying cortex\xfm.py -> build\lib.win32-cpython-310\cortex
  copying cortex\__init__.py -> build\lib.win32-cpython-310\cortex
  creating build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\data.py -> build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\FallbackLoader.py -> build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\htmlembed.py -> build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\serve.py -> build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\view.py -> build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\__init__.py -> build\lib.win32-cpython-310\cortex\webgl
  creating build\lib.win32-cpython-310\cortex\mapper
  copying cortex\mapper\line.py -> build\lib.win32-cpython-310\cortex\mapper
  copying cortex\mapper\mapper.py -> build\lib.win32-cpython-310\cortex\mapper
  copying cortex\mapper\patch.py -> build\lib.win32-cpython-310\cortex\mapper
  copying cortex\mapper\point.py -> build\lib.win32-cpython-310\cortex\mapper
  copying cortex\mapper\samplers.py -> build\lib.win32-cpython-310\cortex\mapper
  copying cortex\mapper\volume.py -> build\lib.win32-cpython-310\cortex\mapper
  copying cortex\mapper\__init__.py -> build\lib.win32-cpython-310\cortex\mapper
  creating build\lib.win32-cpython-310\cortex\dataset
  copying cortex\dataset\braindata.py -> build\lib.win32-cpython-310\cortex\dataset
  copying cortex\dataset\dataset.py -> build\lib.win32-cpython-310\cortex\dataset
  copying cortex\dataset\view2D.py -> build\lib.win32-cpython-310\cortex\dataset
  copying cortex\dataset\viewRGB.py -> build\lib.win32-cpython-310\cortex\dataset
  copying cortex\dataset\views.py -> build\lib.win32-cpython-310\cortex\dataset
  copying cortex\dataset\__init__.py -> build\lib.win32-cpython-310\cortex\dataset
  creating build\lib.win32-cpython-310\cortex\blender
  copying cortex\blender\blendlib.py -> build\lib.win32-cpython-310\cortex\blender
  copying cortex\blender\__init__.py -> build\lib.win32-cpython-310\cortex\blender
  creating build\lib.win32-cpython-310\cortex\tests
  copying cortex\tests\test_dataset.py -> build\lib.win32-cpython-310\cortex\tests
  copying cortex\tests\test_formats.py -> build\lib.win32-cpython-310\cortex\tests
  copying cortex\tests\test_freesurfer.py -> build\lib.win32-cpython-310\cortex\tests
  copying cortex\tests\test_polyutils.py -> build\lib.win32-cpython-310\cortex\tests
  copying cortex\tests\test_quickflat.py -> build\lib.win32-cpython-310\cortex\tests
  copying cortex\tests\test_utils.py -> build\lib.win32-cpython-310\cortex\tests
  copying cortex\tests\__init__.py -> build\lib.win32-cpython-310\cortex\tests
  creating build\lib.win32-cpython-310\cortex\quickflat
  copying cortex\quickflat\composite.py -> build\lib.win32-cpython-310\cortex\quickflat
  copying cortex\quickflat\utils.py -> build\lib.win32-cpython-310\cortex\quickflat
  copying cortex\quickflat\view.py -> build\lib.win32-cpython-310\cortex\quickflat
  copying cortex\quickflat\__init__.py -> build\lib.win32-cpython-310\cortex\quickflat
  creating build\lib.win32-cpython-310\cortex\polyutils
  copying cortex\polyutils\distortion.py -> build\lib.win32-cpython-310\cortex\polyutils
  copying cortex\polyutils\exact_geodesic.py -> build\lib.win32-cpython-310\cortex\polyutils
  copying cortex\polyutils\misc.py -> build\lib.win32-cpython-310\cortex\polyutils
  copying cortex\polyutils\subsurface.py -> build\lib.win32-cpython-310\cortex\polyutils
  copying cortex\polyutils\surface.py -> build\lib.win32-cpython-310\cortex\polyutils
  copying cortex\polyutils\__init__.py -> build\lib.win32-cpython-310\cortex\polyutils
  creating build\lib.win32-cpython-310\cortex\export
  copying cortex\export\panels.py -> build\lib.win32-cpython-310\cortex\export
  copying cortex\export\save_views.py -> build\lib.win32-cpython-310\cortex\export
  copying cortex\export\_default_params.py -> build\lib.win32-cpython-310\cortex\export
  copying cortex\export\__init__.py -> build\lib.win32-cpython-310\cortex\export
  running egg_info
  writing pycortex.egg-info\PKG-INFO
  writing dependency_links to pycortex.egg-info\dependency_links.txt
  writing requirements to pycortex.egg-info\requires.txt
  writing top-level names to pycortex.egg-info\top_level.txt
  dependency C:\Users\5820\AppData\Local\Temp\pip-build-env-ywfbdai_\overlay\Lib\site-packages\numpy\core\include\numpy\arrayobject.h won't be automatically included in the manifest: the path must be relative
  dependency C:\Users\5820\AppData\Local\Temp\pip-build-env-ywfbdai_\overlay\Lib\site-packages\numpy\core\include\numpy\arrayscalars.h won't be automatically included in the manifest: the path must be relative
  dependency C:\Users\5820\AppData\Local\Temp\pip-build-env-ywfbdai_\overlay\Lib\site-packages\numpy\core\include\numpy\ndarrayobject.h won't be automatically included in the manifest: the path must be relative
  dependency C:\Users\5820\AppData\Local\Temp\pip-build-env-ywfbdai_\overlay\Lib\site-packages\numpy\core\include\numpy\ndarraytypes.h won't be automatically included in the manifest: the path must be relative
  dependency C:\Users\5820\AppData\Local\Temp\pip-build-env-ywfbdai_\overlay\Lib\site-packages\numpy\core\include\numpy\ufuncobject.h won't be automatically included in the manifest: the path must be relative
  dependency C:\Users\5820\AppData\Local\Temp\pip-build-env-ywfbdai_\overlay\Lib\site-packages\numpy\core\include\numpy\arrayobject.h won't be automatically included in the manifest: the path must be relative
  dependency C:\Users\5820\AppData\Local\Temp\pip-build-env-ywfbdai_\overlay\Lib\site-packages\numpy\core\include\numpy\arrayscalars.h won't be automatically included in the manifest: the path must be relative
  dependency C:\Users\5820\AppData\Local\Temp\pip-build-env-ywfbdai_\overlay\Lib\site-packages\numpy\core\include\numpy\ndarrayobject.h won't be automatically included in the manifest: the path must be relative
  dependency C:\Users\5820\AppData\Local\Temp\pip-build-env-ywfbdai_\overlay\Lib\site-packages\numpy\core\include\numpy\ndarraytypes.h won't be automatically included in the manifest: the path must be relative
  dependency C:\Users\5820\AppData\Local\Temp\pip-build-env-ywfbdai_\overlay\Lib\site-packages\numpy\core\include\numpy\ufuncobject.h won't be automatically included in the manifest: the path must be relative
  reading manifest file 'pycortex.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE'
  writing manifest file 'pycortex.egg-info\SOURCES.txt'
  C:\Users\5820\AppData\Local\Temp\pip-build-env-ywfbdai_\overlay\Lib\site-packages\setuptools\command\build_py.py:207: _Warning: Package 'cortex.webgl.resources.css' is absent from the `packages` configuration.

  !!
    check.warn(importable)
  C:\Users\5820\AppData\Local\Temp\pip-build-env-ywfbdai_\overlay\Lib\site-packages\setuptools\command\build_py.py:207: _Warning: Package 'cortex.webgl.resources.js.ctm' is absent from the `packages` configuration.
 

  !!
    check.warn(importable)
  copying cortex\bbr.sch -> build\lib.win32-cpython-310\cortex
  copying cortex\defaults.cfg -> build\lib.win32-cpython-310\cortex
  copying cortex\formats.c -> build\lib.win32-cpython-310\cortex
  copying cortex\formats.pyx -> build\lib.win32-cpython-310\cortex
  copying cortex\openctm.c -> build\lib.win32-cpython-310\cortex
  copying cortex\openctm.pxd -> build\lib.win32-cpython-310\cortex
  copying cortex\openctm.pyx -> build\lib.win32-cpython-310\cortex
  copying cortex\svgbase.xml -> build\lib.win32-cpython-310\cortex
  copying cortex\webgl\demo.html -> build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\explo_demo.html -> build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\favicon.ico -> build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\mixer.html -> build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\public.html -> build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\simple.html -> build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\static.html -> build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\template.html -> build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\wngraph-labeled.svg -> build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\wngraph-minimal.html -> build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\wngraph.html -> build\lib.win32-cpython-310\cortex\webgl
  copying cortex\webgl\wngraph.svg -> build\lib.win32-cpython-310\cortex\webgl
  creating build\lib.win32-cpython-310\cortex\webgl\resources
  creating build\lib.win32-cpython-310\cortex\webgl\resources\css
  copying cortex\webgl\resources\css\demo.css -> build\lib.win32-cpython-310\cortex\webgl\resources\css
  copying cortex\webgl\resources\css\jquery-ui.min.css -> build\lib.win32-cpython-310\cortex\webgl\resources\css
  copying cortex\webgl\resources\css\jquery.miniColors.css -> build\lib.win32-cpython-310\cortex\webgl\resources\css
  copying cortex\webgl\resources\css\jsplot.css -> build\lib.win32-cpython-310\cortex\webgl\resources\css
  copying cortex\webgl\resources\css\mriview.css -> build\lib.win32-cpython-310\cortex\webgl\resources\css
  copying cortex\webgl\resources\css\select2-4.0.3.min.css -> build\lib.win32-cpython-310\cortex\webgl\resources\css
  copying cortex\webgl\resources\css\w2ui-1.2.min.css -> build\lib.win32-cpython-310\cortex\webgl\resources\css
  copying cortex\webgl\resources\css\w2ui-1.4.2.css -> build\lib.win32-cpython-310\cortex\webgl\resources\css
  copying cortex\webgl\resources\css\w2ui-1.4.2.min.css -> build\lib.win32-cpython-310\cortex\webgl\resources\css
  creating build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\colors.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\control-pause.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\control-play.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\loading.gif -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\magnifying_glass.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\trigger.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\ui-bg_diagonals-thick_18_b81900_40x40.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\ui-bg_diagonals-thick_20_666666_40x40.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\ui-bg_flat_10_000000_40x100.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\ui-bg_glass_100_f6f6f6_1x400.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\ui-bg_glass_100_fdf5ce_1x400.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\ui-bg_glass_65_ffffff_1x400.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\ui-bg_gloss-wave_35_f6a828_500x100.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\ui-bg_highlight-soft_100_eeeeee_1x100.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\ui-bg_highlight-soft_75_ffe45c_1x100.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\ui-icons_222222_256x240.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\ui-icons_228ef1_256x240.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\ui-icons_ef8c08_256x240.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\ui-icons_ffd27a_256x240.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  copying cortex\webgl\resources\css\images\ui-icons_ffffff_256x240.png -> build\lib.win32-cpython-310\cortex\webgl\resources\css\images
  creating build\lib.win32-cpython-310\cortex\webgl\resources\explo_demo
  copying cortex\webgl\resources\explo_demo\cursor.png -> build\lib.win32-cpython-


  running build_ext
  INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  building 'cortex.openctm' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  [end of output]

注意:此错误源自子进程,并且可能不是 pip 的问题。 错误:pycortex 构建轮子失败 构建 pycortex 失败 错误:无法为 pycortex 构建轮子,这是安装基于 pyproject.toml 的项目所必需的

python visual-c++ pip anaconda python-packaging
1个回答
0
投票

您的错误消息指出

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.

看来您正在使用Python 3.10,因此您可能必须使用

setuptools < 60.0

© www.soinside.com 2019 - 2024. All rights reserved.