Closed mmcauliffe closed 8 years ago
Thanks for reporting this. It seems strange that a direct pip install works but not when it's installed as a dependency.
I'll look into it.
I got the same error on OS X even by running setup.py manually, when I did not have Cython installed:
% python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to resampy.egg-info/requires.txt
writing resampy.egg-info/PKG-INFO
writing top-level names to resampy.egg-info/top_level.txt
writing dependency_links to resampy.egg-info/dependency_links.txt
reading manifest file 'resampy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.pxd' under directory 'resampy'
writing manifest file 'resampy.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.10-x86_64/egg
running install_lib
running build_py
running build_ext
building 'resampy.interp' extension
clang -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c resampy/interp.c -o build/temp.macosx-10.10-x86_64-2.7/resampy/interp.o
clang: error: no such file or directory: 'resampy/interp.c'
clang: error: no input files
error: command 'clang' failed with exit status 1
After installing it, the message changed:
% python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to resampy.egg-info/requires.txt
writing resampy.egg-info/PKG-INFO
writing top-level names to resampy.egg-info/top_level.txt
writing dependency_links to resampy.egg-info/dependency_links.txt
reading manifest file 'resampy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.pxd' under directory 'resampy'
writing manifest file 'resampy.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.10-x86_64/egg
running install_lib
running build_py
running build_ext
building 'resampy.interp' extension
error: unknown file type '.pyx' (from 'resampy/interp.pyx')
I was able to make it work by changing setup.py to use cythonize, though I'm not very familiar with Cython and don't know if this is the right thing to do.
Thanks @comex -- I'm also not all that experienced in shipping cython modules, but this was quite helpful.
This should be resolved now. Unfortunately, pypi went down while I was uploading the new release, so you might have to wait a bit before it's installable.
Dear Sir, I have the same problem while installing librosa,
Collecting librosa
Requirement already satisfied: joblib>=0.7.0 in c:\python\lib\site-packages (from librosa)
Requirement already satisfied: numpy>=1.8.0 in c:\python\lib\site-packages (from librosa)
Requirement already satisfied: decorator>=3.0.0 in c:\python\lib\site-packages (from librosa)
Requirement already satisfied: scikit-learn>=0.14.0 in c:\python\lib\site-packages (from librosa)
Requirement already satisfied: audioread>=2.0.0 in c:\python\lib\site-packages (from librosa)
Collecting resampy>=0.1.2 (from librosa)
Using cached resampy-0.1.5.tar.gz
Requirement already satisfied: scipy>=0.13.0 in c:\python\lib\site-packages (from librosa)
Requirement already satisfied: six>=1.3 in c:\python\lib\site-packages (from librosa)
Requirement already satisfied: Cython>=0.23 in c:\python\lib\site-packages (from resampy>=0.1.2->librosa)
Building wheels for collected packages: resampy
Running setup.py bdist_wheel for resampy ... error
Complete output from command C:\Python\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\KHALID~1\\AppData\\Local\\Temp\\pip-build-rul5p_dh\\resampy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\KHALID~1\AppData\Local\Temp\tmpwf2gxa4lpip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\resampy
copying resampy\core.py -> build\lib.win32-3.6\resampy
copying resampy\filters.py -> build\lib.win32-3.6\resampy
copying resampy\version.py -> build\lib.win32-3.6\resampy
copying resampy\__init__.py -> build\lib.win32-3.6\resampy
creating build\lib.win32-3.6\resampy\data
copying resampy\data\kaiser_best.npz -> build\lib.win32-3.6\resampy\data
copying resampy\data\kaiser_fast.npz -> build\lib.win32-3.6\resampy\data
running build_ext
building 'resampy.interp' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Failed building wheel for resampy
Running setup.py clean for resampy
Failed to build resampy
Installing collected packages: resampy, librosa
Running setup.py install for resampy ... error
Complete output from command C:\Python\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\KHALID~1\\AppData\\Local\\Temp\\pip-build-rul5p_dh\\resampy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\KHALID~1\AppData\Local\Temp\pip-bmhdejmr-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\resampy
copying resampy\core.py -> build\lib.win32-3.6\resampy
copying resampy\filters.py -> build\lib.win32-3.6\resampy
copying resampy\version.py -> build\lib.win32-3.6\resampy
copying resampy\__init__.py -> build\lib.win32-3.6\resampy
creating build\lib.win32-3.6\resampy\data
copying resampy\data\kaiser_best.npz -> build\lib.win32-3.6\resampy\data
copying resampy\data\kaiser_fast.npz -> build\lib.win32-3.6\resampy\data
running build_ext
building 'resampy.interp' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Command "C:\Python\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\KHALID~1\\AppData\\Local\\Temp\\pip-build-rul5p_dh\\resampy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\KHALID~1\AppData\Local\Temp\pip-bmhdejmr-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\KHALID~1\AppData\Local\Temp\pip-build-rul5p_dh\resampy\
So, I am first installing the resampy but it was not installing and giving the errors such as,
Collecting resampy
Using cached resampy-0.1.5.tar.gz
Requirement already satisfied: numpy>=1.10 in c:\python\lib\site-packages (from resampy)
Requirement already satisfied: scipy>=0.13 in c:\python\lib\site-packages (from resampy)
Requirement already satisfied: six>=1.3 in c:\python\lib\site-packages (from resampy)
Requirement already satisfied: Cython>=0.23 in c:\python\lib\site-packages (from resampy)
Building wheels for collected packages: resampy
Running setup.py bdist_wheel for resampy ... error
Complete output from command C:\Python\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\KHALID~1\\AppData\\Local\\Temp\\pip-build-_ntfrmif\\resampy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\KHALID~1\AppData\Local\Temp\tmpz6tep_ydpip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\resampy
copying resampy\core.py -> build\lib.win32-3.6\resampy
copying resampy\filters.py -> build\lib.win32-3.6\resampy
copying resampy\version.py -> build\lib.win32-3.6\resampy
copying resampy\__init__.py -> build\lib.win32-3.6\resampy
creating build\lib.win32-3.6\resampy\data
copying resampy\data\kaiser_best.npz -> build\lib.win32-3.6\resampy\data
copying resampy\data\kaiser_fast.npz -> build\lib.win32-3.6\resampy\data
running build_ext
building 'resampy.interp' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Failed building wheel for resampy
Running setup.py clean for resampy
Failed to build resampy
Installing collected packages: resampy
Running setup.py install for resampy ... error
Complete output from command C:\Python\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\KHALID~1\\AppData\\Local\\Temp\\pip-build-_ntfrmif\\resampy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\KHALID~1\AppData\Local\Temp\pip-02uxzvu1-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\resampy
copying resampy\core.py -> build\lib.win32-3.6\resampy
copying resampy\filters.py -> build\lib.win32-3.6\resampy
copying resampy\version.py -> build\lib.win32-3.6\resampy
copying resampy\__init__.py -> build\lib.win32-3.6\resampy
creating build\lib.win32-3.6\resampy\data
copying resampy\data\kaiser_best.npz -> build\lib.win32-3.6\resampy\data
copying resampy\data\kaiser_fast.npz -> build\lib.win32-3.6\resampy\data
running build_ext
building 'resampy.interp' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Command "C:\Python\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\KHALID~1\\AppData\\Local\\Temp\\pip-build-_ntfrmif\\resampy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\KHALID~1\AppData\Local\Temp\pip-02uxzvu1-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\KHALID~1\AppData\Local\Temp\pip-build-_ntfrmif\resampy\
Please help me to fix the problem, thanks for your cooperation
Please help me to fix the problem, thanks for your cooperation
If you're going to build resampy from source, you need a C compiler:
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
If that's not feasible for you, I recommend going with the conda-forge package as described in the readme.
I have installed Microsoft Visual C++ 15.0 but it was again giving the same error,
Secondly when I tried with conda-forge, it was giving the error as mentioned below (C:\Anaconda) D:\DCASE2017-baseline-system-master>conda install -c conda-forge librosa=0.5.0 Fetching package metadata ............. Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
Please help me to solve this error,
UnsatisfiableError: The following specifications were found to be in conflict:
It looks like conda-forge is not yet building python 3.6 packages for librosa. I don't know what's going on there.
Conda-forge does have python 3.6 packages for resampy though, so conda install -c conda-forge resampy
should work for you. You should then be able to pip install librosa
.
Alternatively, if you can roll back your anaconda environment to python 3.5, everything should work out of the box.
Dear Brain McFee, conda install -c conda-forge resampy is also not working,
(C:\Anaconda) D:\DCASE2017-baseline-system-master>conda install -c conda-forge resampy Fetching package metadata ............. Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
What should I do next your great favor is highly appreciable. Thank you
I recommend rolling back to a py3.5 environment for now.
Dear Brain McFee, I have rolled back to py3.5
But still facing the error while installing resampy either by pip install resampy or conda install resampy here is the error screenshot
D:\DCASE2017-baseline-system-master\applications>pip install resampy
Collecting resampy
Using cached resampy-0.1.5.tar.gz
Requirement already satisfied: numpy>=1.10 in c:\anaconda\lib\site-packages (from resampy)
Requirement already satisfied: scipy>=0.13 in c:\anaconda\lib\site-packages (from resampy)
Requirement already satisfied: six>=1.3 in c:\anaconda\lib\site-packages (from resampy)
Requirement already satisfied: Cython>=0.23 in c:\anaconda\lib\site-packages (from resampy)
Building wheels for collected packages: resampy
**Running setup.py bdist_wheel for resampy ... error**
Complete output from command C:\Anaconda\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\KHALID~1\\AppData\\Local\\Temp\\pip-build-mtg90fca\\resampy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\KHALID~1\AppData\Local\Temp\tmpjpi4bmg4pip-wheel- --python-tag cp35:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.5
creating build\lib.win32-3.5\resampy
copying resampy\core.py -> build\lib.win32-3.5\resampy
copying resampy\filters.py -> build\lib.win32-3.5\resampy
copying resampy\version.py -> build\lib.win32-3.5\resampy
copying resampy\__init__.py -> build\lib.win32-3.5\resampy
creating build\lib.win32-3.5\resampy\data
copying resampy\data\kaiser_best.npz -> build\lib.win32-3.5\resampy\data
copying resampy\data\kaiser_fast.npz -> build\lib.win32-3.5\resampy\data
running build_ext
building 'resampy.interp' extension
**_error: [WinError 2] The system cannot find the file specified_**
----------------------------------------
Failed building wheel for resampy
Running setup.py clean for resampy
Failed to build resampy
Installing collected packages: resampy
Running setup.py install for resampy ... error
Complete output from command C:\Anaconda\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\KHALID~1\\AppData\\Local\\Temp\\pip-build-mtg90fca\\resampy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\KHALID~1\AppData\Local\Temp\pip-2696ee50-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.5
creating build\lib.win32-3.5\resampy
copying resampy\core.py -> build\lib.win32-3.5\resampy
copying resampy\filters.py -> build\lib.win32-3.5\resampy
copying resampy\version.py -> build\lib.win32-3.5\resampy
copying resampy\__init__.py -> build\lib.win32-3.5\resampy
creating build\lib.win32-3.5\resampy\data
copying resampy\data\kaiser_best.npz -> build\lib.win32-3.5\resampy\data
copying resampy\data\kaiser_fast.npz -> build\lib.win32-3.5\resampy\data
running build_ext
building 'resampy.interp' extension
**error: [WinError 2] The system cannot find the file specified**
Command "C:\Anaconda\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\KHALID~1\\AppData\\Local\\Temp\\pip-build-mtg90fca\\resampy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\KHALID~1\AppData\Local\Temp\pip-2696ee50-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\KHALID~1\AppData\Local\Temp\pip-build-mtg90fca\resampy\
Please help to solve the problem thanking you
How did conda installation fail in your 3.5 environment?
Hi Brain McFee, I am very thankful to you for providing such precious help. Every thing is now fine with py3.5.0 after restarting the system.
On Tue, Apr 4, 2017 at 4:51 PM, Brian McFee notifications@github.com wrote:
How did conda installation fail in your 3.5 environment?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bmcfee/resampy/issues/18#issuecomment-291476633, or mute the thread https://github.com/notifications/unsubscribe-auth/AZkvZiKVNcNvzffNI_R8ZFKLr_q-L1AMks5rsi6zgaJpZM4Ijh7B .
I've had a couple of issues installing resampy when trying to install librosa, with errors similar to the following:
In general, this can be worked around by doing
pip install resampy
which gives similar errors about missing resampy/interp.c during bdist_wheel, but then falls back on installing via setup.py install, something like (on windows):Let me know if you need any further info from me.