NREL / disco

DISCO
BSD 3-Clause "New" or "Revised" License
10 stars 5 forks source link

Error encountered while installing disco environment in Windows #172

Open ann-sherin opened 1 year ago

ann-sherin commented 1 year ago

Expected behavior DISCO environment should be installed when running command: pip install NREL-disco

Actual behavior Installation fails with 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/

To Reproduce Steps to reproduce the behavior:

Additional context

daniel-thom commented 1 year ago

@ann-sherin I know this is frustrating, but there's not much we can do about it. I've seen this error and the user gets a very clear message that says, "go to this link and install this software." Do you have any suggestions? It's possible that if all dependent packages are stored in conda, we could avoid the need to build. But we have so many 3rd-party dependencies, I'm not even sure that would work.

ann-sherin commented 1 year ago

You are right. It usually is pretty clear on what the issue is. And is easy to fix by going to the link and installing.

My sense is that for this particular issue - it would not work at all on Windows if we don't have the Microsoft Build Tools software installed. (which is a pretty big install ~9GB). Because it was such a big install, I wasnt sure if I should install it or try to find a work around And so is this something that we should mention in the documentation or someplace (faqs)? Note: I dont know how generalizable this issue is - like do other Windows users face this too....

I just wanted to make a note of this issue in case someone else faces this.

bpalmintier commented 1 year ago

Perhaps it's worth adding the need to have Microsoft build tools installed (for Windows--maybe something similar for Mac or other?) to the DISCO installation notes?

ppaudyal-nrel commented 1 year ago

Following up on this issue, I encountered the same error while installing Disco on Windows. I followed the process of installing Microsoft build tools, however, I still get the error "ERROR: Could not build wheels for multidict, which is required to install pyproject.toml-based projects" I get the error for this step : pip install -e . Attached is the snippet of the error that I see. Could you please help with this issue @daniel-thom @ann-sherin ? error_installing_disco_1 error_installing_disco_2

daniel-thom commented 1 year ago

@ppaudyal-nrel It seems like your installation of the MS Build Tools did not work.

The cause of this issue is this chain of dependences: disco -> pydss -> aiohttp -> multidict. Disco users (and most pydss users) do not need aiohttp, so I've opened a PR in PyDSS to remove this requirement: https://github.com/NREL/PyDSS/pull/120

Here are your options:

daniel-thom commented 1 year ago

A workaround for this issue is to install multidict through conda and then install disco.

conda install -c conda-forge multidict