muon-spectroscopy-computational-project / pymuon-suite

Collection of scripts and utilities for muon spectroscopy
GNU General Public License v3.0
8 stars 7 forks source link

more particle_mass: problem installing euphonics #59

Closed leandro-liborio closed 2 years ago

leandro-liborio commented 2 years ago

Created a new virtual environment and cloned the branch with particle_mass in it. Then tried to install following the requirements.txt:


pip install -r requirements.txt

Got the following error when installing euphonics:


Building wheel for euphonic (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [61 lines of output] /private/var/folders/k7/qdrdqs2x2xn4v423hppvw6ym0000gp/T/pip-install-k5s9k7br/euphonic_b44fa6f9ac1b476599b4e783083e48c7/setup.py:174: UserWarning: [Errno 2] No such file or directory: 'CITATION.cff' run_setup() running bdist_wheel running build running build_py creating build creating build/lib creating build/lib/euphonic copying euphonic/powder.py -> build/lib/euphonic copying euphonic/crystal.py -> build/lib/euphonic copying euphonic/plot.py -> build/lib/euphonic copying euphonic/force_constants.py -> build/lib/euphonic copying euphonic/qpoint_phonon_modes.py -> build/lib/euphonic copying euphonic/_version.py -> build/lib/euphonic copying euphonic/util.py -> build/lib/euphonic copying euphonic/io.py -> build/lib/euphonic copying euphonic/init.py -> build/lib/euphonic copying euphonic/validate.py -> build/lib/euphonic copying euphonic/qpoint_frequencies.py -> build/lib/euphonic copying euphonic/sampling.py -> build/lib/euphonic copying euphonic/debye_waller.py -> build/lib/euphonic copying euphonic/spectra.py -> build/lib/euphonic copying euphonic/structure_factor.py -> build/lib/euphonic creating build/lib/euphonic/cli copying euphonic/cli/show_sampling.py -> build/lib/euphonic/cli copying euphonic/cli/intensity_map.py -> build/lib/euphonic/cli copying euphonic/cli/optimise_dipole_parameter.py -> build/lib/euphonic/cli copying euphonic/cli/powder_map.py -> build/lib/euphonic/cli copying euphonic/cli/dos.py -> build/lib/euphonic/cli copying euphonic/cli/init.py -> build/lib/euphonic/cli copying euphonic/cli/utils.py -> build/lib/euphonic/cli copying euphonic/cli/dispersion.py -> build/lib/euphonic/cli creating build/lib/euphonic/readers copying euphonic/readers/init.py -> build/lib/euphonic/readers copying euphonic/readers/phonopy.py -> build/lib/euphonic/readers copying euphonic/readers/castep.py -> build/lib/euphonic/readers creating build/lib/euphonic/data copying euphonic/data/init.py -> build/lib/euphonic/data creating build/lib/euphonic/styles copying euphonic/styles/init.py -> build/lib/euphonic/styles running egg_info writing manifest file 'euphonic.egg-info/SOURCES.txt' copying euphonic/CITATION.cff -> build/lib/euphonic copying euphonic/LICENSE -> build/lib/euphonic copying euphonic/data/bluebook.json -> build/lib/euphonic/data copying euphonic/data/constants_en.txt -> build/lib/euphonic/data copying euphonic/data/default_en.txt -> build/lib/euphonic/data copying euphonic/data/sears-1992.json -> build/lib/euphonic/data copying euphonic/styles/base.mplstyle -> build/lib/euphonic/styles copying euphonic/styles/intensity_widget.mplstyle -> build/lib/euphonic/styles UPDATING build/lib/euphonic/_version.py set build/lib/euphonic/_version.py to '0.6.3' /usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running install running install_lib running build_ext creating build/temp.macosx-12-x86_64-3.9 creating build/temp.macosx-12-x86_64-3.9/c /usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -I/Users/jgv75944/Library/Python/3.9/lib/python/site-packages/numpy/core/include -Ic -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c c/_euphonic.c -o build/temp.macosx-12-x86_64-3.9/c/_euphonic.o -fopenmp error: command '/usr/local/opt/llvm/bin/clang' failed: No such file or directory [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for euphonic


One of the messages in the error is connected with the clang library:


error: command '/usr/local/opt/llvm/bin/clang' failed: No such file or directory

Added 'clang' to the requirements.txt, but still does not work

elichad commented 2 years ago

From the Euphonic docs: Mac OSX requires a brew install of the llvm-clang compiler before running pip install: brew install llvm.

Alternatively, you could try running pip install wheel first (this works on MacOS in our CI).

Does that help?