rohinkumar / correlcalc

A Python package to calculate 2-point correlation function from galaxy redshift surveys for any generic model of Cosmology or geometry
MIT License
7 stars 3 forks source link

DEPRECATION: Could not build wheels for correlcalc #1

Open tuanbui53 opened 4 years ago

tuanbui53 commented 4 years ago

Failed to install pymangle to install correlcalc. I already installed wheel, but unable to install pymangle. Don't know how to solve this problem. I also already try to install from this git project. Could you please give me some suggestion? Here is the output of sudo pip install correlcalc:

`Collecting correlcalc Downloading correlcalc-1.0.tar.gz (219 kB) |████████████████████████████████| 219 kB 815 kB/s Requirement already satisfied: numpy in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from correlcalc) (1.16.0) Requirement already satisfied: scipy in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from correlcalc) (1.4.1) Requirement already satisfied: astropy in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from correlcalc) (3.1.1) Requirement already satisfied: cython in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from correlcalc) (0.29.2) Requirement already satisfied: tqdm in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from correlcalc) (4.48.2) Collecting pymangle Downloading pymangle-0.9.1.tar.gz (29 kB) Collecting sklearn Downloading sklearn-0.0.tar.gz (1.1 kB) Requirement already satisfied: matplotlib in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from correlcalc) (3.0.2) Requirement already satisfied: scikit-learn in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from sklearn->correlcalc) (0.19.1) Requirement already satisfied: cycler>=0.10 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from matplotlib->correlcalc) (0.10.0) Requirement already satisfied: kiwisolver>=1.0.1 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from matplotlib->correlcalc) (1.0.1) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from matplotlib->correlcalc) (2.2.0) Requirement already satisfied: python-dateutil>=2.1 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from matplotlib->correlcalc) (2.7.3) Requirement already satisfied: six in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from cycler>=0.10->matplotlib->correlcalc) (1.15.0) Requirement already satisfied: setuptools in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib->correlcalc) (47.3.1) Building wheels for collected packages: correlcalc, pymangle, sklearn Building wheel for correlcalc (setup.py) ... error ERROR: Command errored out with exit status 1: command: /opt/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-_2q_ti8t/correlcalc/setup.py'"'"'; file='"'"'/private/tmp/pip-install-_2q_ti8t/correlcalc/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 /private/tmp/pip-wheel-qpu2h8iq cwd: /private/tmp/pip-install-_2q_ti8t/correlcalc/ Complete output (43 lines): /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py:454: UserWarning: Normalizing '1.000' to '1.0' warnings.warn(tmpl.format(**locals())) running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.14-x86_64-3.6 creating build/lib.macosx-10.14-x86_64-3.6/correlcalc copying correlcalc/comovdist.py -> build/lib.macosx-10.14-x86_64-3.6/correlcalc copying correlcalc/tpcf.py -> build/lib.macosx-10.14-x86_64-3.6/correlcalc copying correlcalc/genrand.py -> build/lib.macosx-10.14-x86_64-3.6/correlcalc copying correlcalc/init.py -> build/lib.macosx-10.14-x86_64-3.6/correlcalc copying correlcalc/param.py -> build/lib.macosx-10.14-x86_64-3.6/correlcalc copying correlcalc/datprep.py -> build/lib.macosx-10.14-x86_64-3.6/correlcalc copying correlcalc/test.py -> build/lib.macosx-10.14-x86_64-3.6/correlcalc copying correlcalc/antpcf.py -> build/lib.macosx-10.14-x86_64-3.6/correlcalc copying correlcalc/rough.py -> build/lib.macosx-10.14-x86_64-3.6/correlcalc copying correlcalc/main.py -> build/lib.macosx-10.14-x86_64-3.6/correlcalc copying correlcalc/fileios.py -> build/lib.macosx-10.14-x86_64-3.6/correlcalc copying correlcalc/runtimeupdate.py -> build/lib.macosx-10.14-x86_64-3.6/correlcalc copying correlcalc/testnew.py -> build/lib.macosx-10.14-x86_64-3.6/correlcalc copying correlcalc/datvis.py -> build/lib.macosx-10.14-x86_64-3.6/correlcalc running egg_info writing correlcalc.egg-info/PKG-INFO writing dependency_links to correlcalc.egg-info/dependency_links.txt writing requirements to correlcalc.egg-info/requires.txt writing top-level names to correlcalc.egg-info/top_level.txt reading manifest file 'correlcalc.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'correlcalc.egg-info/SOURCES.txt' running build_ext skipping 'metrics/metrics.c' Cython extension (up-to-date) building 'correlcalc.metrics' extension creating build/temp.macosx-10.14-x86_64-3.6 creating build/temp.macosx-10.14-x86_64-3.6/metrics /usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/opt/local/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c metrics/metrics.c -o build/temp.macosx-10.14-x86_64-3.6/metrics/metrics.o clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot] In file included from metrics/metrics.c:17: /opt/local/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/Python.h:25:10: fatal error: 'stdio.h' file not found

include

       ^~~~~~~~~

1 error generated. error: command '/usr/bin/clang' failed with exit status 1

ERROR: Failed building wheel for correlcalc Running setup.py clean for correlcalc Building wheel for pymangle (setup.py) ... error ERROR: Command errored out with exit status 1: command: /opt/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-_2q_ti8t/pymangle/setup.py'"'"'; file='"'"'/private/tmp/pip-install-_2q_ti8t/pymangle/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 /private/tmp/pip-wheel-4e1r5u2f cwd: /private/tmp/pip-install-_2q_ti8t/pymangle/ Complete output (21 lines): running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.14-x86_64-3.6 creating build/lib.macosx-10.14-x86_64-3.6/pymangle copying pymangle/version.py -> build/lib.macosx-10.14-x86_64-3.6/pymangle copying pymangle/mangle.py -> build/lib.macosx-10.14-x86_64-3.6/pymangle copying pymangle/init.py -> build/lib.macosx-10.14-x86_64-3.6/pymangle copying pymangle/test.py -> build/lib.macosx-10.14-x86_64-3.6/pymangle running build_ext building 'pymangle._mangle' extension creating build/temp.macosx-10.14-x86_64-3.6 creating build/temp.macosx-10.14-x86_64-3.6/pymangle /usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c pymangle/_mangle.c -o build/temp.macosx-10.14-x86_64-3.6/pymangle/_mangle.o clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot] pymangle/_mangle.c:3:10: fatal error: 'string.h' file not found

include

       ^~~~~~~~~~

1 error generated. error: command '/usr/bin/clang' failed with exit status 1

ERROR: Failed building wheel for pymangle Running setup.py clean for pymangle Building wheel for sklearn (setup.py) ... done Created wheel for sklearn: filename=sklearn-0.0-py2.py3-none-any.whl size=1319 sha256=143da93891660e894c49d41c7cd920f490fb6376ec9b4590157dc875b2b75b61 Stored in directory: /private/tmp/pip-ephem-wheel-cache-8ja5dfx2/wheels/23/9d/42/5ec745cbbb17517000a53cecc49d6a865450d1f5cb16dc8a9c Successfully built sklearn Failed to build correlcalc pymangle DEPRECATION: Could not build wheels for correlcalc, pymangle which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368. Installing collected packages: pymangle, sklearn, correlcalc Running setup.py install for pymangle ... error ERROR: Command errored out with exit status 1: command: /opt/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-_2q_ti8t/pymangle/setup.py'"'"'; file='"'"'/private/tmp/pip-install-_2q_ti8t/pymangle/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-e9qfsagx/install-record.txt --single-version-externally-managed --compile --install-headers /opt/local/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/pymangle cwd: /private/tmp/pip-install-_2q_ti8t/pymangle/ Complete output (21 lines): running install running build running build_py creating build creating build/lib.macosx-10.14-x86_64-3.6 creating build/lib.macosx-10.14-x86_64-3.6/pymangle copying pymangle/version.py -> build/lib.macosx-10.14-x86_64-3.6/pymangle copying pymangle/mangle.py -> build/lib.macosx-10.14-x86_64-3.6/pymangle copying pymangle/init.py -> build/lib.macosx-10.14-x86_64-3.6/pymangle copying pymangle/test.py -> build/lib.macosx-10.14-x86_64-3.6/pymangle running build_ext building 'pymangle._mangle' extension creating build/temp.macosx-10.14-x86_64-3.6 creating build/temp.macosx-10.14-x86_64-3.6/pymangle /usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c pymangle/_mangle.c -o build/temp.macosx-10.14-x86_64-3.6/pymangle/_mangle.o clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot] pymangle/_mangle.c:3:10: fatal error: 'string.h' file not found

include

         ^~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------

ERROR: Command errored out with exit status 1: /opt/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-_2q_ti8t/pymangle/setup.py'"'"'; file='"'"'/private/tmp/pip-install-_2q_ti8t/pymangle/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-e9qfsagx/install-record.txt --single-version-externally-managed --compile --install-headers /opt/local/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/pymangle Check the logs for full command output.`

rohinkumar commented 4 years ago

Apologies for delayed response.

Unfortunately, correlcalc is not ported to python3. It is based on the legacy python 2.7. I see you were training to install it with python 3.6 (based on the log provided). Please install correlcalc with python 2.7 and it should work. Generally, recommended way is to create a python environment.

Hope this helps.