f90 / Wave-U-Net

Implementation of the Wave-U-Net for audio source separation
MIT License
845 stars 177 forks source link

MacOSX additional installation steps #15

Closed kmturley closed 5 years ago

kmturley commented 5 years ago

I was getting this error on MacOSX: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework.

and also then missing library: ImportError: No module named wx

I fixed using the following steps:

export MPLBACKEND="WXAgg"
pip install tensorflow==1.8.0
pip install -U wxPython
python Predict.py with cfg.full_44KHz
f90 commented 5 years ago

Thanks for reporting this. For the first error, seems like Python is not set up correctly - this is outside of my control.

To the second issue: While this seems MacOS-specific and so I can't really ensure that my installation instructions will also work on MacOS right away, but I made the following changes:

  1. Remove dependency on the matplotlib package when making predictions (running Predict.py) or running the training (Training.py) by putting all plotting code into an extra file (Plot.py). Also removed the package from the requirements.txt so it is not even installed by default. Therefore we should only encounter these matplotlib Mac problems when people actually want to plot the figures in the paper, which is a rather rare use case compared to prediction and training.

  2. I will link to this fix you found in the Readme file, it was logged there already since the problem popped up already (see here), but with a slightly different solution. I will include both these solutions so people will find something that works for them.

If you could be so nice, can you clone the repository again, and create a new Python virtual environment and install the packages now again using pip install -r requirements.txt and then trying to run Predict.py to see if it now works without any issue? Since matplotlib should now not be used anymore in this scenario. Thanks!

kmturley commented 5 years ago

Awesome, it works when used like this:

virtualenv env
source env/bin/activate
pip install -r requirements.txt
python Predict.py with cfg.full_44KHz
f90 commented 5 years ago

Great! Thanks for testing whether this code-change fixed it. Have fun with the Wave-U-Net ;)