kkoutini / PaSST

Efficient Training of Audio Transformers with Patchout
Apache License 2.0
295 stars 50 forks source link

Is it possible to install the passt with python=3.6? #22

Closed Alibabade closed 2 years ago

Alibabade commented 2 years ago

Hi, thanks so much for sharing the great work! I'd like to use PaSST for downstream tasks and integrate it into existing conda environment with python=3.6 (it 's kind of painful to upgrade python from 3.6 to 3.7/3.8 due to many inconsistent packages). I know that python>=3.7 is required to install PaSST, but I'm wandering if it's possible to install it with python=3.6?

kkoutini commented 2 years ago

Hi, thank you for the interest. Unfortuently I'm not sure if the code is runnable on python=3.6. I started working on an 3.7 environment and kept it. If there is issues on 3.6, you can post them here. I'd be happy to help.

Alibabade commented 2 years ago

Hi, thanks for the reply! I managed to transplant the hear21passt from python3.8 to python3.6. And here are some tricks I used:

  1. create a env with python=3.8 and install passt successfully.
  2. download the passt package, and change the "python>=3.7" to "python>=3.6" in 'setup.py' file.
  3. run "python setup.py install". normally, it should automatically install necessary libs/packages.
  4. backup 'helpers.py' file in '/{path to your original env}/lib/python3.6/site-packages/timm/models/', then copy the 'helpers.py' and 'hub.py' files from '/{path to your just created env}/lib/python3.8/site-packages/timm/models/' to '/{path to your original env}/lib/python3.6/site-packages/timm/models/'.
  5. then you are ready to go. I'm not sure if this works for other scenarios since I use it for inference only, but I hope it could help someone facing this similar problem.