12

How deep does the rabbit hole go?

Problem: Convert numpy array containing an audio time series to a .wav file and save on disk

Error 1:
Me: pip install "stupid package"
Console: Can't pip, behind a proxy

Me: Finds workaround after several minutes

Error 2:
Conversion works, but audio file on disk doesn't work
Encoding Error only works with array of ints not floats
BUT I NEED IT TO BE FLOATS

Looks for another library
scikits.audiolab <- should work
Me: pip --proxy=myproxy:port install "this shit"
Command Line *spits back huge error*

Googles error <- You need to install this package with a .whl file
Me: Downloads .whl file <- pip install "filename".whl
Command Line: ERROR: scikits.audiolab-0.11.0-cp27-cp27m-win32.whl is not a supported wheel on this platform.

Googles Error <- Need to see supported file formats
Me: python -c "import pip; print(pip.pep425tags.get_supported())"
Console: AttributeError: module 'pip' has no attribute 'pep425tags'

Googles Error <- Use another command for pip v10
Me: python -c "import pip._internal; print(pip._internal.pep425tags.get_supported())"
Console: complies

Me: pip install "filename".whl
Console: complies

Me: *spends 30 minutes to find directory where I should paste .dll file*
Finds Directory (was hidden btw), pastes file

Me: Runs .py file
Console: from version import version as _version ModuleNotFoundError: No module named 'version'

Googles Error <- Fix is: "just comment out the import statement"
Me: HAHAHAHAHAHA
Console: HAHAHAHAHA

Unfortunately this shit still didn't work after two hours of debugging, lmao fuck this

Comments
  • 2
    Did you figure it out?
  • 1
    Don’t leave us hanging!! ?
  • 2
    Yup. and you need numpy, scipy, and for some reason opencv to get the shit done.
    also - c++ 1.17 redist.msi, and 1.14.

    fuck python on windoze. just fuck.
  • 1
    Lmao, I'll let you guys know tomorrow when I work on it again.

    So far, one library completely doesn't work with python 3.7 without having to manually edit all the files in it.

    One throws a weird Error.

    And two other ones just produce Audio Files that are unplayable.

    Currently my fix is saving the numpy array to disk as .npy file and then loading it in and playing it with a package called sounddevice. It's not elegant but so far I don't need more. But in the future I will need to fix this.
  • 1
    Not elegant is an understatement. I feel for you bro!!!!
  • 0
    That's python in a nutshell!!

    what's an intepreter language worth if it only slows down and for every import you fight through dependency/native code hell anyways?

    angry script kiddies in 5...4...3...2...1...
  • 0
    @h0ru5 REEEEEEEEEEEEE IMPIORTS ARE BETTER ON PYTHON REEEEEEEEEEEEEEEEEEEEEE

    seriously tho the only issues i have with python on win32 are that some packages on PyPi aren't called what they are called when importimg.
Add Comment