question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can not install pyscf on mac OS

See original GitHub issue

I encounter the issue of compiling lib on mac OS

System info: OS: mac OS 10.13.3 Clang: Target: Apple LLVM version 9.0.0 (clang-900.0.39.2)

I follow the instruction here: http://sunqm.github.io/pyscf/tutorial.html#quick-setup

after I do cmake and then try to make on the system, it fails. does anyone install pyscf on mac? Thanks.

Here is the error message:

/Users/XXX/temp/pyscf/pyscf/lib/build/deps/src/libxcfun/src/functionals/pw92eps.h:21:13: error: call to 'cbrt' is ambiguous
    return (cbrt(2)/(cbrt(2)-1))*(d.a_43+d.b_43)*d.n_m13/d.n - 1/(cbrt(2)-1);
            ^~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:1041:1: note: candidate function [with _A1 = int]
cbrt(_A1 __lcpp_x) _NOEXCEPT {return ::cbrt((double)__lcpp_x);}
^
/Users/XXX/temp/pyscf/pyscf/lib/build/deps/src/libxcfun/src/taylor/taylor_math.h:261:10: note: candidate function [with T = int]
inline T cbrt(T x)
         ^
/usr/include/math.h:435:15: note: candidate function
extern double cbrt(double);
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:1035:46: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY float       cbrt(float __lcpp_x) _NOEXCEPT       {return ::cbrtf(__lcpp_x);}
                                             ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:1036:46: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long double cbrt(long double __lcpp_x) _NOEXCEPT {return ::cbrtl(__lcpp_x);}
                                             ^
In file included from /Users/XXX/temp/pyscf/pyscf/lib/build/deps/src/libxcfun/src/functionals/ldaerfc.cpp:2:
/Users/XXX/temp/pyscf/pyscf/lib/build/deps/src/libxcfun/src/functionals/pw92eps.h:21:22: error: call to 'cbrt' is ambiguous
    return (cbrt(2)/(cbrt(2)-1))*(d.a_43+d.b_43)*d.n_m13/d.n - 1/(cbrt(2)-1);
                     ^~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:1041:1: note: candidate function [with _A1 = int]
cbrt(_A1 __lcpp_x) _NOEXCEPT {return ::cbrt((double)__lcpp_x);}
^
/Users/XXX/temp/pyscf/pyscf/lib/build/deps/src/libxcfun/src/taylor/taylor_math.h:261:10: note: candidate function [with T = int]
inline T cbrt(T x)
         ^
/usr/include/math.h:435:15: note: candidate function
extern double cbrt(double);
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:1035:46: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY float       cbrt(float __lcpp_x) _NOEXCEPT       {return ::cbrtf(__lcpp_x);}
                                             ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:1036:46: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long double cbrt(long double __lcpp_x) _NOEXCEPT {return ::cbrtl(__lcpp_x);}
                                             ^
In file included from /Users/XXX/temp/pyscf/pyscf/lib/build/deps/src/libxcfun/src/functionals/ldaerfc.cpp:2:
/Users/XXX/temp/pyscf/pyscf/lib/build/deps/src/libxcfun/src/functionals/pw92eps.h:21:67: error: call to 'cbrt' is ambiguous
    return (cbrt(2)/(cbrt(2)-1))*(d.a_43+d.b_43)*d.n_m13/d.n - 1/(cbrt(2)-1);
                                                                  ^~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:1041:1: note: candidate function [with _A1 = int]
cbrt(_A1 __lcpp_x) _NOEXCEPT {return ::cbrt((double)__lcpp_x);}
^
/Users/XXX/temp/pyscf/pyscf/lib/build/deps/src/libxcfun/src/taylor/taylor_math.h:261:10: note: candidate function [with T = int]
inline T cbrt(T x)
         ^
/usr/include/math.h:435:15: note: candidate function
extern double cbrt(double);
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:1035:46: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY float       cbrt(float __lcpp_x) _NOEXCEPT       {return ::cbrtf(__lcpp_x);}
                                             ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:1036:46: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long double cbrt(long double __lcpp_x) _NOEXCEPT {return ::cbrtl(__lcpp_x);}
                                             ^

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tberkelcommented, Feb 22, 2018

This is not a problem of pyscf, but rather the XCFun library compiled with clang. The issue has come up before in XCFun #22, potentially unique to homebrew installed build tools, and supposedly fixed in XCFun #27.

0reactions
chunfuchencommented, Feb 26, 2018

Thanks, I just use basic functionalities now, after I disable xcfun library, it works well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation - PySCF
If you already have installed PySCF via pip, you can upgrade it to the new ... For Mac OS X/macOS, you may get...
Read more >
Multiple Installation issues for macosx-arm64 #1015 - GitHub
What is the current behavior? I have tried two methods of building pyscf for platform macOS-arm64 (Apple silicon): 1. pip install pyscf and...
Read more >
Pyscf install error: failed building wheel - python - Stack Overflow
You can try 'conda install -c conda-forge pyscf'. It worked for me.
Read more >
How to install PySCF on UBUNTU or MacOSX? - BragitOff.com
To install PySCF, you will need to have Python and pip (Python's ... and pip installed, you can install PySCF using the following...
Read more >
How to fix “QiskitChemistryError:PySCF is not installed”
I'm trying to simulate LiH using VQE. But I keep getting the error QiskitChemistryError:PySCF is not installed And I tried several ways to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found