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 install failure on MacOS High Sierra 10.13 #813

Open
duncandc opened this issue Oct 2, 2017 · 16 comments
Open

pip install failure on MacOS High Sierra 10.13 #813

duncandc opened this issue Oct 2, 2017 · 16 comments
Assignees
Milestone

Comments

@duncandc
Copy link
Contributor

duncandc commented Oct 2, 2017

I tried to install Halotools with pip install halotools and the install fails with the following error:

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/02/_3trvknx2199yf629jn2hm3r0000gn/T/pip-build-syx0iqkf/halotools/

@duncandc
Copy link
Contributor Author

duncandc commented Oct 2, 2017

After trying to install this using setup.py, I get the following error:

unable to execute 'x86_64-apple-darwin13.4.0-clang++': No such file or directory error: command 'x86_64-apple-darwin13.4.0-clang++' failed with exit status 1

There is some issue with clang on OS 10.13 that I cannot figure out. Setting CC=clang or gcc does not solve the problem for me.

This seems to be similar to issue #447 that @manodeep was having last year.

@aphearin
Copy link
Contributor

aphearin commented Oct 2, 2017

I've never encountered that before, Duncan. Tagging @eteq and @bsipocz in case they've seen this issue come up before in other affiliated packages that use cython.

@bsipocz
Copy link
Member

bsipocz commented Oct 2, 2017

@aphearin - Sorry, I haven't seen this before as I don't have any c++ dependencies for my projects. Hopefully @eteq or stackoverflow will know a solution.

@duncandc
Copy link
Contributor Author

duncandc commented Oct 2, 2017

ok, one more thing that is interesting. For some reason, the setup script is looking for a much older version of the compiler. Here is the version of clang I have. (gcc and g++ all link to the same thing)

clang --version
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin17.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

This is different than x86_64-apple-darwin13.4.0-clang++ that comes up in the error.

@duncandc
Copy link
Contributor Author

duncandc commented Oct 3, 2017

Okay, there is a VERY simple solution. Setting the CXX variable is key. export CXX=clang solves the problem. I think the astropy setup utils could be slightly more informative when the c++ or the c compilers are not set.

@manodeep
Copy link
Contributor

manodeep commented Oct 3, 2017

The default compiler is the compiler that was originally used to compile python. Which tends to be fairly old.
@duncandc glad you got the compilation sorted.

@duncandc
Copy link
Contributor Author

duncandc commented Oct 3, 2017

ok, all is good. I think we should consider adding a note about setting CXX=clang to the installation troubleshooting page. @aphearin thoughts? https://halotools.readthedocs.io/en/latest/installation_troubleshooting.html#installation-troubleshooting

@aphearin
Copy link
Contributor

aphearin commented Oct 3, 2017

Sounds good, Duncan. Since you encountered the issue then you're probably the best person to write the docs modification in a way that will be clearest to other people who encounter it.

@aphearin aphearin closed this as completed Oct 3, 2017
@Zellar209
Copy link

I encountered the same problem, but after the "export CXX=clang", the error still exits.

@aphearin aphearin reopened this Dec 8, 2018
@aphearin aphearin added this to the v0.7 milestone Dec 8, 2018
@aphearin aphearin self-assigned this Dec 8, 2018
@aphearin
Copy link
Contributor

@Zellar209 - can you give some more details of your system information? For example, I am able to reproduce a cython build problem in python 3.6, but not in 2.7.

@youmin817
Copy link

"export CXX=clang" is not working for me..

@aphearin
Copy link
Contributor

@youmin817 - what version of python? Can you give some system information?

@youmin817
Copy link

@youmin817 - what version of python? Can you give some system information?

I have python3.7

@JiaminShi
Copy link

@youmin817 I have the similar issue and I fixed it by running
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++

@manodeep
Copy link
Contributor

@JamieShi Do you get the performance boost with threads when using /usr/bin/clang to compile?

@aphearin aphearin modified the milestones: v0.7, next-release Jan 7, 2020
@vishalbarad
Copy link

@JiaminShi Thank you.
I had similar problem. I used
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
and my problem solved.

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

8 participants