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

pip failed to build medleydb #87

Open
gszep opened this issue Jul 10, 2018 · 1 comment
Open

pip failed to build medleydb #87

gszep opened this issue Jul 10, 2018 · 1 comment

Comments

@gszep
Copy link

gszep commented Jul 10, 2018

When running pip install . inside the root medleydb directory I get this error

Installing collected packages: medleydb
  Running setup.py install for medleydb ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-3m5VSF/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-jCG1KO/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/medleydb
    copying medleydb/mix.py -> build/lib.linux-x86_64-2.7/medleydb
    copying medleydb/version.py -> build/lib.linux-x86_64-2.7/medleydb
    copying medleydb/multitrack.py -> build/lib.linux-x86_64-2.7/medleydb
    copying medleydb/__init__.py -> build/lib.linux-x86_64-2.7/medleydb
    copying medleydb/utils.py -> build/lib.linux-x86_64-2.7/medleydb
    copying medleydb/download.py -> build/lib.linux-x86_64-2.7/medleydb
    creating build/lib.linux-x86_64-2.7/medleydb/resources
    copying medleydb/resources/tracklist_bach10.txt -> build/lib.linux-x86_64-2.7/medleydb/resources
    copying medleydb/resources/taxonomy.yaml -> build/lib.linux-x86_64-2.7/medleydb/resources
    copying medleydb/resources/instrument_f0_type.json -> build/lib.linux-x86_64-2.7/medleydb/resources
    copying medleydb/resources/mixing_coefficients.yaml -> build/lib.linux-x86_64-2.7/medleydb/resources
    copying medleydb/resources/mixing_coefficients_version2.yaml -> build/lib.linux-x86_64-2.7/medleydb/resources
    copying medleydb/resources/tracklist_v1.txt -> build/lib.linux-x86_64-2.7/medleydb/resources
    copying medleydb/resources/client_secrets.json -> build/lib.linux-x86_64-2.7/medleydb/resources
    copying medleydb/resources/tracklist_extra.txt -> build/lib.linux-x86_64-2.7/medleydb/resources
    copying medleydb/resources/artist_index.json -> build/lib.linux-x86_64-2.7/medleydb/resources
    copying medleydb/resources/tracklist_v2.txt -> build/lib.linux-x86_64-2.7/medleydb/resources
    copying medleydb/resources/pyin.n3 -> build/lib.linux-x86_64-2.7/medleydb/resources
    creating build/lib.linux-x86_64-2.7/medleydb/data
    error: can't copy 'medleydb/data/Metadata': doesn't exist or not a regular file
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-3m5VSF/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-jCG1KO/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-req-build-3m5VSF/

It feels like a similar error that is thrown when you attempt to cp a directory without specifying --recursive. I recommend a fix according to this Stackoverflow thread

--- Relevant Specifications ---
Ubuntu 16.04
Python 2.7.12
setuptools 20.7.0

@gszep
Copy link
Author

gszep commented Jul 10, 2018

the following changes on lines 5-9 in setup.py seems to successfully install the library

-package_data = ['resources/*']
+package_data = ['resources/*.*']
 os.chdir('medleydb')
-package_data.extend(['{0}/*'.format(root)
+package_data.extend(['{0}/*.*'.format(root)
                     for root, dirs, files in os.walk('data')])

Following installation I ran python tests/test_* from the medleydb source root directory
and no errors were returned, suggesting that everything was installed correctly? Anyway I have a branch ready to merge changes to master if you like

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

1 participant