pik-copan / pyunicorn

Unified Complex Network and Recurrence Analysis Toolbox
http://pik-potsdam.de/~donges/pyunicorn/
Other
200 stars 87 forks source link

pip install pyunicorn error:error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2 #194

Closed Mospymh closed 1 year ago

Mospymh commented 1 year ago

windows:11,python:3.8 and 3.7 i have tried,they both return the same error(pip version23.2.1) as below:

Collecting pyunicorn
  Using cached pyunicorn-0.6.1.tar.gz (881 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.14 in f:\anaconda\envs\glearning\lib\site-packages (from pyunicorn) (1.24.4)
Requirement already satisfied: scipy>=1.0 in f:\anaconda\envs\glearning\lib\site-packages (from pyunicorn) (1.10.1)
Collecting python-igraph>=0.7 (from pyunicorn)
  Obtaining dependency information for python-igraph>=0.7 from https://files.pythonhosted.org/packages/7f/df/564a717eb3fa9b7dd05b114a20f83e363addb160018642c0ed2301c31668/python_igraph-0.10.6-py3-none-any.whl.metadata
  Using cached python_igraph-0.10.6-py3-none-any.whl.metadata (2.9 kB)
Requirement already satisfied: igraph==0.10.6 in f:\anaconda\envs\glearning\lib\site-packages (from python-igraph>=0.7->pyunicorn) (0.10.6)
Requirement already satisfied: texttable>=1.6.2 in f:\anaconda\envs\glearning\lib\site-packages (from igraph==0.10.6->python-igraph>=0.7->pyunicorn) (1.6.7)
Using cached python_igraph-0.10.6-py3-none-any.whl (9.1 kB)
Building wheels for collected packages: pyunicorn
  Building wheel for pyunicorn (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [97 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-38
      creating build\lib.win-amd64-cpython-38\pyunicorn
      copying pyunicorn\conftest.py -> build\lib.win-amd64-cpython-38\pyunicorn
      copying pyunicorn\__init__.py -> build\lib.win-amd64-cpython-38\pyunicorn
      creating build\lib.win-amd64-cpython-38\pyunicorn\core
      copying pyunicorn\core\data.py -> build\lib.win-amd64-cpython-38\pyunicorn\core
      copying pyunicorn\core\geo_network.py -> build\lib.win-amd64-cpython-38\pyunicorn\core
      copying pyunicorn\core\grid.py -> build\lib.win-amd64-cpython-38\pyunicorn\core
      copying pyunicorn\core\interacting_networks.py -> build\lib.win-amd64-cpython-38\pyunicorn\core
      copying pyunicorn\core\netcdf_dictionary.py -> build\lib.win-amd64-cpython-38\pyunicorn\core
      copying pyunicorn\core\network.py -> build\lib.win-amd64-cpython-38\pyunicorn\core
      copying pyunicorn\core\resistive_network.py -> build\lib.win-amd64-cpython-38\pyunicorn\core
      copying pyunicorn\core\__init__.py -> build\lib.win-amd64-cpython-38\pyunicorn\core
      creating build\lib.win-amd64-cpython-38\pyunicorn\core\_ext
      copying pyunicorn\core\_ext\__init__.py -> build\lib.win-amd64-cpython-38\pyunicorn\core\_ext
      creating build\lib.win-amd64-cpython-38\pyunicorn\climate
      copying pyunicorn\climate\climate_data.py -> build\lib.win-amd64-cpython-38\pyunicorn\climate
      copying pyunicorn\climate\climate_network.py -> build\lib.win-amd64-cpython-38\pyunicorn\climate
      copying pyunicorn\climate\coupled_climate_network.py -> build\lib.win-amd64-cpython-38\pyunicorn\climate
      copying pyunicorn\climate\coupled_tsonis.py -> build\lib.win-amd64-cpython-38\pyunicorn\climate
      copying pyunicorn\climate\eventsynchronization_climatenetwork.py -> build\lib.win-amd64-cpython-38\pyunicorn\climate
      copying pyunicorn\climate\havlin.py -> build\lib.win-amd64-cpython-38\pyunicorn\climate
      copying pyunicorn\climate\hilbert.py -> build\lib.win-amd64-cpython-38\pyunicorn\climate
      copying pyunicorn\climate\map_plots.py -> build\lib.win-amd64-cpython-38\pyunicorn\climate
      copying pyunicorn\climate\mutual_info.py -> build\lib.win-amd64-cpython-38\pyunicorn\climate
      copying pyunicorn\climate\partial_correlation.py -> build\lib.win-amd64-cpython-38\pyunicorn\climate
      copying pyunicorn\climate\rainfall.py -> build\lib.win-amd64-cpython-38\pyunicorn\climate
      copying pyunicorn\climate\spearman.py -> build\lib.win-amd64-cpython-38\pyunicorn\climate
      copying pyunicorn\climate\tsonis.py -> build\lib.win-amd64-cpython-38\pyunicorn\climate
      copying pyunicorn\climate\__init__.py -> build\lib.win-amd64-cpython-38\pyunicorn\climate
      creating build\lib.win-amd64-cpython-38\pyunicorn\climate\_ext
      copying pyunicorn\climate\_ext\__init__.py -> build\lib.win-amd64-cpython-38\pyunicorn\climate\_ext
      creating build\lib.win-amd64-cpython-38\pyunicorn\timeseries
      copying pyunicorn\timeseries\cross_recurrence_plot.py -> build\lib.win-amd64-cpython-38\pyunicorn\timeseries
      copying pyunicorn\timeseries\inter_system_recurrence_network.py -> build\lib.win-amd64-cpython-38\pyunicorn\timeseries
      copying pyunicorn\timeseries\joint_recurrence_network.py -> build\lib.win-amd64-cpython-38\pyunicorn\timeseries
      copying pyunicorn\timeseries\joint_recurrence_plot.py -> build\lib.win-amd64-cpython-38\pyunicorn\timeseries
      copying pyunicorn\timeseries\recurrence_network.py -> build\lib.win-amd64-cpython-38\pyunicorn\timeseries
      copying pyunicorn\timeseries\recurrence_plot.py -> build\lib.win-amd64-cpython-38\pyunicorn\timeseries
      copying pyunicorn\timeseries\surrogates.py -> build\lib.win-amd64-cpython-38\pyunicorn\timeseries
      copying pyunicorn\timeseries\visibility_graph.py -> build\lib.win-amd64-cpython-38\pyunicorn\timeseries
      copying pyunicorn\timeseries\__init__.py -> build\lib.win-amd64-cpython-38\pyunicorn\timeseries
      creating build\lib.win-amd64-cpython-38\pyunicorn\timeseries\_ext
      copying pyunicorn\timeseries\_ext\__init__.py -> build\lib.win-amd64-cpython-38\pyunicorn\timeseries\_ext
      creating build\lib.win-amd64-cpython-38\pyunicorn\funcnet
      copying pyunicorn\funcnet\coupling_analysis.py -> build\lib.win-amd64-cpython-38\pyunicorn\funcnet
      copying pyunicorn\funcnet\coupling_analysis_pure_python.py -> build\lib.win-amd64-cpython-38\pyunicorn\funcnet
      copying pyunicorn\funcnet\event_synchronization.py -> build\lib.win-amd64-cpython-38\pyunicorn\funcnet
      copying pyunicorn\funcnet\__init__.py -> build\lib.win-amd64-cpython-38\pyunicorn\funcnet
      creating build\lib.win-amd64-cpython-38\pyunicorn\funcnet\_ext
      copying pyunicorn\funcnet\_ext\__init__.py -> build\lib.win-amd64-cpython-38\pyunicorn\funcnet\_ext
      creating build\lib.win-amd64-cpython-38\pyunicorn\eventseries
      copying pyunicorn\eventseries\eca.py -> build\lib.win-amd64-cpython-38\pyunicorn\eventseries
      creating build\lib.win-amd64-cpython-38\pyunicorn\utils
      copying pyunicorn\utils\mpi.py -> build\lib.win-amd64-cpython-38\pyunicorn\utils
      copying pyunicorn\utils\navigator.py -> build\lib.win-amd64-cpython-38\pyunicorn\utils
      copying pyunicorn\utils\__init__.py -> build\lib.win-amd64-cpython-38\pyunicorn\utils
      creating build\lib.win-amd64-cpython-38\pyunicorn\utils\progressbar
      copying pyunicorn\utils\progressbar\compat.py -> build\lib.win-amd64-cpython-38\pyunicorn\utils\progressbar
      copying pyunicorn\utils\progressbar\progressbar.py -> build\lib.win-amd64-cpython-38\pyunicorn\utils\progressbar
      copying pyunicorn\utils\progressbar\widgets.py -> build\lib.win-amd64-cpython-38\pyunicorn\utils\progressbar
      copying pyunicorn\utils\progressbar\__init__.py -> build\lib.win-amd64-cpython-38\pyunicorn\utils\progressbar
      running build_ext
      building 'pyunicorn.climate._ext.numerics' extension
      creating build\temp.win-amd64-cpython-38
      creating build\temp.win-amd64-cpython-38\Release
      creating build\temp.win-amd64-cpython-38\Release\pyunicorn
      creating build\temp.win-amd64-cpython-38\Release\pyunicorn\climate
      creating build\temp.win-amd64-cpython-38\Release\pyunicorn\climate\_ext
      "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ipyunicorn/climate/_ext -IF:\anaconda\envs\Glearning\lib\site-packages\numpy\core\include -IF:\anaconda\envs\Glearning\include -IF:\anaconda\envs\Glearning\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt" /Tcpyunicorn/climate/_ext/numerics.c /Fobuild\temp.win-amd64-cpython-38\Release\pyunicorn/climate/_ext/numerics.obj -O3 -std=c99
      cl: 命令行 warning D9002 :忽略未知选项“-O3”
      cl: 命令行 warning D9002 :忽略未知选项“-std=c99”
      numerics.c
      F:\anaconda\envs\Glearning\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-n5b63su_\pyunicorn_3e1feb0f8b1d48459e149c13c9e30ef0\pyunicorn\climate\_ext\src_numerics.c(35): warning C4133: “=”: 从“float *”到“double *”的类型不兼容
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-n5b63su_\pyunicorn_3e1feb0f8b1d48459e149c13c9e30ef0\pyunicorn\climate\_ext\src_numerics.c(47): warning C4244: “=”: 从“double”转换到“long”,可能丢失数据
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-n5b63su_\pyunicorn_3e1feb0f8b1d48459e149c13c9e30ef0\pyunicorn\climate\_ext\src_numerics.c(133): warning C4244: “+=”: 从“double”转换到“float”,可能丢失数据
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-n5b63su_\pyunicorn_3e1feb0f8b1d48459e149c13c9e30ef0\pyunicorn\climate\_ext\src_numerics.c(196): error C2057: 应输入常量表达式
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-n5b63su_\pyunicorn_3e1feb0f8b1d48459e149c13c9e30ef0\pyunicorn\climate\_ext\src_numerics.c(196): error C2466: 不能分配常量大小为 0 的数组
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-n5b63su_\pyunicorn_3e1feb0f8b1d48459e149c13c9e30ef0\pyunicorn\climate\_ext\src_numerics.c(196): error C2133: “rankedi”: 未知的大小
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-n5b63su_\pyunicorn_3e1feb0f8b1d48459e149c13c9e30ef0\pyunicorn\climate\_ext\src_numerics.c(197): error C2057: 应输入常量表达式
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-n5b63su_\pyunicorn_3e1feb0f8b1d48459e149c13c9e30ef0\pyunicorn\climate\_ext\src_numerics.c(197): error C2466: 不能分配常量大小为 0 的数组
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-n5b63su_\pyunicorn_3e1feb0f8b1d48459e149c13c9e30ef0\pyunicorn\climate\_ext\src_numerics.c(197): error C2133: “rankedj”: 未知的大小
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-n5b63su_\pyunicorn_3e1feb0f8b1d48459e149c13c9e30ef0\pyunicorn\climate\_ext\src_numerics.c(198): error C2057: 应输入常量表达式
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-n5b63su_\pyunicorn_3e1feb0f8b1d48459e149c13c9e30ef0\pyunicorn\climate\_ext\src_numerics.c(198): error C2466: 不能分配常量大小为 0 的数组
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-n5b63su_\pyunicorn_3e1feb0f8b1d48459e149c13c9e30ef0\pyunicorn\climate\_ext\src_numerics.c(198): error C2133: “normalizedi”: 未知的大小
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-n5b63su_\pyunicorn_3e1feb0f8b1d48459e149c13c9e30ef0\pyunicorn\climate\_ext\src_numerics.c(199): error C2057: 应输入常量表达式
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-n5b63su_\pyunicorn_3e1feb0f8b1d48459e149c13c9e30ef0\pyunicorn\climate\_ext\src_numerics.c(199): error C2466: 不能分配常量大小为 0 的数组
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-n5b63su_\pyunicorn_3e1feb0f8b1d48459e149c13c9e30ef0\pyunicorn\climate\_ext\src_numerics.c(199): error C2133: “normalizedj”: 未知的大小
      C:\Users\Lenovo\AppData\Local\Temp\pip-install-n5b63su_\pyunicorn_3e1feb0f8b1d48459e149c13c9e30ef0\pyunicorn\climate\_ext\src_numerics.c(232): warning C4244: “=”: 从“double”转换到“float”,可能丢失数据
      pyunicorn/climate/_ext/numerics.c(5410): warning C4244: “函数”: 从“double”转换到“float”,可能丢失数据
      pyunicorn/climate/_ext/numerics.c(5410): warning C4244: “函数”: 从“double”转换到“float”,可能丢失数据
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyunicorn
  Running setup.py clean for pyunicorn
Failed to build pyunicorn
ERROR: Could not build wheels for pyunicorn, which is required to install pyproject.toml-based projects`

Can you kindly let me know how to fix this?

Thanks!

fkuehlein commented 1 year ago

Hi @Mospymh,

you are using our last official release version pyunicorn-0.6.1 which unfortunately still faced installation problems on Windows systems, just as you experienced. These problems have been addressed in #160 and this issue can hence be closed as a duplicate.

Please retry installation with the most recent master branch. If you should still face problems, please report back in the above referenced Issue. Thank you!