Can't install discount with pip: error: command 'cc' failed with exit status 1
10,248
Try:
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install discount
This seems to be an issue with LLVM in XCode 5.1 as mentioned here: Can't install mysql gem on OS X
Author by
MichaelKaeser
Updated on June 12, 2022Comments
-
MichaelKaeser almost 2 years
I am running into many problems when trying to install the
discount
package on osx 10.9 Mavericks. I'm working with the django framework.My steps are (while having a virtualenv activated):
pip install discount
Then I get:
. . . 1 error generated. error: command 'cc' failed with exit status 1 ---------------------------------------- Cleaning up... Command /Users/KaeserMic/Sites/2013/Duotones/naturkostbar/env/bin/python -c "import setuptools;__file__='/Users/KaeserMic/Sites/2013/Duotones/naturkostbar/env/build/discount/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/4b/smwv2y_s32z044brp6t__ssh0000gp/T/pip-65i7x3-record/install-record.txt --single-version-externally-managed --install-headers /Users/KaeserMic/Sites/2013/Duotones/naturkostbar/env/include/site/python2.7 failed with error code 1 in /Users/KaeserMic/Sites/2013/Duotones/naturkostbar/env/build/discount Storing complete log in /Users/KaeserMic/.pip/pip.log
Here is the complete log:
https://gist.github.com/MichaelKaeser/7302829
Things I did:
- updating python
- updating pip
- updating virtualenv
- updating homebrew
Any ideas how to solve this issue? Thanks in advance.
-
MichaelKaeser over 10 yearsYes it ouutputs both an error:
clang: error: no input files
. But I do have Xcode installed, version 5.0.1 -
Admin over 10 yearsThat error is normal because there's no input file.
cc
is installed on your mac by default I guess. Anyway, just google forXcode Command Line Tools 10.9
and install them. -
Admin over 10 yearsTry this:
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11 /usr/local/include/X11
-
MichaelKaeser over 10 yearsI created the link to X11 like you explained, but it doesn't change anything. What's the link supposed to achieve?
-
Admin over 10 yearsIt's creating a symbolic link for X11, some people worked with them. Anyway, these are the main problems. The last thing I could think of is to run
xcode-select --install
in the terminal, in case you already installed the tools, it shouldn't download. Give it a shot anyway. I had the same issue, and it worked after installing the xcode command line tools. -
MichaelKaeser over 10 yearsTried it, but an alert window pops up with:
Can't install the software because it is not currently available from the Software Update server.
Already did that 12 hours ago... -
Mart Coul over 10 yearsI add the same error on Mavericks. Although Xcode was installed, I still needed to run the xcode-select command as explained in the answer to make it work.
xcode-select --install
-
Hartley Brody about 10 yearsNote to any copy/paster's that the
pip install
command for the OP's package is on the end of that command. You might have to edit if you got this error while installing something else. -
andilabs about 10 yearsIt helped me installing jellyfish on Mac OS X 10.9. THANKS!