ahodges9 / LedFx

LedFx is a network based LED effect controller with support for advanced real-time audio effects! LedFx can control multiple devices and works great with cheap ESP8266 nodes allowing for cost effectvice syncronized effects across your entire house!
MIT License
384 stars 91 forks source link

Strruggling to install on Win 10 #98

Closed jimmyeao closed 4 years ago

jimmyeao commented 4 years ago

I ended up having to install Visual Studio C++ tools to get it to compile, then had to install pyaudio manually because the compile fails. Now when I try and open LEDFX I get this:

(ledfx) C:\Users\jimmy>ledfx --open-ui
Loading configuration file from C:\Users\jimmy\AppData\Roaming\.ledfx
Could not import the PyAudio C module '_portaudio'.
Traceback (most recent call last):
  File "c:\users\jimmy\anaconda3\envs\ledfx\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\jimmy\anaconda3\envs\ledfx\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\jimmy\anaconda3\envs\ledfx\Scripts\ledfx.exe\__main__.py", line 7, in <module>
  File "c:\users\jimmy\anaconda3\envs\ledfx\lib\site-packages\ledfx\__main__.py", line 88, in main
    ledfx = LedFxCore(config_dir = args.config)
  File "c:\users\jimmy\anaconda3\envs\ledfx\lib\site-packages\ledfx\core.py", line 36, in __init__
    self.http = HttpServer(
  File "c:\users\jimmy\anaconda3\envs\ledfx\lib\site-packages\ledfx\http.py", line 19, in __init__
    self.api = RestApi(ledfx)
  File "c:\users\jimmy\anaconda3\envs\ledfx\lib\site-packages\ledfx\api\__init__.py", line 33, in __init__
    super().__init__(ledfx, RestEndpoint, self.PACKAGE_NAME)
  File "c:\users\jimmy\anaconda3\envs\ledfx\lib\site-packages\ledfx\utils.py", line 189, in __init__
    self.import_registry(package)
  File "c:\users\jimmy\anaconda3\envs\ledfx\lib\site-packages\ledfx\utils.py", line 225, in import_registry
    importlib.import_module(name)
  File "c:\users\jimmy\anaconda3\envs\ledfx\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "c:\users\jimmy\anaconda3\envs\ledfx\lib\site-packages\ledfx\api\audio_devices.py", line 6, in <module>
    import pyaudio
  File "c:\users\jimmy\anaconda3\envs\ledfx\lib\site-packages\pyaudio.py", line 116, in <module>
    import _portaudio as pa
ImportError: DLL load failed while importing _portaudio: The specified module could not be found.

(ledfx) C:\Users\jimmy>
dshokouhi commented 4 years ago

I get the same issue, would love to know how to install it on windows.

dshokouhi commented 4 years ago

Finally got it to work, I had to run conda install -c anaconda portaudio from: https://stackoverflow.com/questions/50243645/i-cant-import-pyaudio

then ledfx was able to start

jimmyeao commented 4 years ago

solved with conda install -c anaconda pyaudio

atuline commented 4 years ago

The install documentation has NO mention of C++, so, even with this command added, that documentation is STILL incomplete/inaccurate. I'm still trying to work out the exact step by step procedure to install it from a fresh copy of Win10.

Oh, and adding thoses C++ tools and this command still didn't work for me.

I'm quite surprised/disappointed that the author of LedFX hasn't fixed his install documentation.

jimmyeao commented 4 years ago

It also seems to have blue screened my windows box (looks like a problem related to the audio driver) after a couple of hours of running. I have an old laptop I'm going to stick Linux on and use that.

Mattallmighty commented 4 years ago

Have a look at https://ledfx.readthedocs.io/en/latest/index.html

atuline commented 4 years ago

Yep, that was my starting point, and it does not work at all with a fresh install of Windows 10 (I use a VirtualBox VM environment with sound enabled to test). That would be:

  1. Download/install Anaconda
  2. Open up an Anaconda 32 bit shell
  3. conda create -n ledfx
  4. conda activate ledfx
  5. conda config --add channels conda-forge
  6. conda install aubio portaudio pywin32
  7. pip install ledfx
Mattallmighty commented 4 years ago

Can you please show doing the steps listed above in Anaconda navigator -> environments -> ledfx -> Open terminal. Paste your terminal commands on https://pastebin.com/ and send me the link.

atuline commented 4 years ago

From a freshly patched install of Windows 1909 build in VirtualBox with the audio input and output enabled. Chrome, 7-Zip and the Arduino IDE were previously installed and the most recent version of Anaconda JUST installed. I ran the commands from the '"Anaconda Prompt (anaconda 3)". The documentation page didn't mention anything about using Anaconda Navigator :

https://pastebin.com/McH98Ue3