Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on arch with No module named 'distutils' #149

Open
cainmacdotcom opened this issue Nov 2, 2024 · 3 comments
Open

Build fails on arch with No module named 'distutils' #149

cainmacdotcom opened this issue Nov 2, 2024 · 3 comments

Comments

@cainmacdotcom
Copy link

Describe the bug
build fails

To Reproduce
Steps to reproduce the behavior:

pip install basic-pitch

Expected behavior
build to complete

Screenshots
File "/tmp/pip-build-env-mfvu9q2b/overlay/lib/python3.12/site-packages/setuptools/init.py", line 10, in
import distutils.core
ModuleNotFoundError: No module named 'distutils'

Desktop (please complete the following information):

  • OS: Arch

Additional context
c@csam ~]$ paru -Q | grep dist
python-distutils-extra 2.39-13

@utku-helvaci
Copy link

utku-helvaci commented Nov 2, 2024

you don't want to use python 3.12 since it has a required tool depricated: pkgutil.ImpImporter and distutils
this is how I did using pipxu and python 3.9 (mind that cuda is for nvidia gpus):

pipxu install basic-pitch --python python3.9
pipxu inject basic-pitch setuptools
pipxu inject basic-pitch basic-pitch[tf]
pipxu inject basic-pitch numpy==1.26.4

assuming that you use python 3.10 or below equivalent commands are:

pip install basic-pitch
pip install setuptools
pip install basic-pitch[tf]
pip install  numpy==1.26.4

Edit: for cuda: (we've to tell numpy version again otherwise it tries to update it):
for pipxu:

pipxu inject basic-pitch  tensorflow[and-cuda]==2.14.0 numpy==1.26.4

for pip:

pip install  tensorflow[and-cuda]==2.14.0 numpy==1.26.4

if you're using pipx just replace pipxu with pipx
tensorflow==2.14.0 wrapt==1.14.1 keras==2.14.0 ml-dtypes==0.2.0 numpy==1.26.4 protobuf==4.25.5

@utku-helvaci
Copy link

we can certainly fix most of these problems by pushing a pull request to requirements file

@drubinstein
Copy link
Contributor

distutils was removed in python3.12. You can either submit a PR that will fix the requirements or install basic pitch in a version of python <3.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants