NREL / GreenHEART

Other
2 stars 9 forks source link

humpday module requires Visual C++ on Windows #22

Closed jmartin4nrel closed 4 days ago

jmartin4nrel commented 4 weeks ago

Sorry for not reporting this sooner before the GreenHEART/HOPP split, which has made the issue even worse: the required module "humpday" triggers the need to build an "accumulation_tree" wheel during the install . step. On Windows, this leads to the following error if Visual C++ is not installed. The humpday module does appear to be needed for anything, so I think it would be easier to get rid of it than require Visual C++ to be installed for Windows compatibility.

Building wheels for collected packages: greenheart, accumulation-tree
  Building editable for greenheart (pyproject.toml) ... done
  Created wheel for greenheart: filename=greenheart-0.1.0-0.editable-py3-none-any.whl size=9078 sha256=df3852fb8a295caeefd4893cdc5bc986a72d6770905f5c954d30d5c945ff689a
  Stored in directory: C:\Users\jmartin4\AppData\Local\Temp\1\pip-ephem-wheel-cache-iup314gn\wheels\de\b2\91\038aea742d9044229c221418ba6e3d916f1584817d16c53789
  Building wheel for accumulation-tree (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for accumulation-tree (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [22 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build\lib.win-amd64-cpython-39\accumulation_tree
      copying accumulation_tree\abctree.py -> build\lib.win-amd64-cpython-39\accumulation_tree
      copying accumulation_tree\treeslice.py -> build\lib.win-amd64-cpython-39\accumulation_tree
      copying accumulation_tree\__init__.py -> build\lib.win-amd64-cpython-39\accumulation_tree
      running egg_info
      writing accumulation_tree.egg-info\PKG-INFO
      writing dependency_links to accumulation_tree.egg-info\dependency_links.txt
      writing top-level names to accumulation_tree.egg-info\top_level.txt
      reading manifest file 'accumulation_tree.egg-info\SOURCES.txt'
      adding license file 'LICENSE'
      writing manifest file 'accumulation_tree.egg-info\SOURCES.txt'
      copying accumulation_tree\accumulation_tree.pyx -> build\lib.win-amd64-cpython-39\accumulation_tree
      running build_ext
      C:\Users\jmartin4\AppData\Local\Temp\1\pip-build-env-vq631mdj\overlay\Lib\site-packages\Cython\Compiler\Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: C:\Users\jmartin4\AppData\Local\Temp\1\pip-install-4luy36n1\accumulation-tree_d0b0698c7fe7497eaf2a99f53585988c\accumulation_tree\accumulation_tree.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      Compiling accumulation_tree/accumulation_tree.pyx because it changed.
      [1/1] Cythonizing accumulation_tree/accumulation_tree.pyx
      building 'accumulation_tree.accumulation_tree' 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]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for accumulation-tree
Successfully built greenheart
Failed to build accumulation-tree
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (accumulation-tree)
bayc commented 4 weeks ago

Good to know. I put in a PR on the HOPP repo to remove that and other dependencies that I don't believe are needed any longer. Awaiting confirmation to remove. I will open a similar PR here.