[Django]-Error while installing uWSGI on mac

40👍

gcc already installed, just export CC=gcc will be ok.

18👍

distutils is probably returning something like “gcc-4.2” instead of plain old “gcc”.

With sudo, etc., you probably want to do something like this:

sudo CC=gcc pip install uwsgi
👤Evin

7👍

Install CommandLine Tools

$xcode-select --install

Then run

$pip install uwsgi

0👍

first install gcc compiler

xcode-select --install

0👍

Install Xcode in your mac than select command line tool in Xcode preferences. It works for me by doing pip install uwsgi

👤K.MAZ

0👍

Use pip with sudo

sometimes pip packages are not installed or python is not able to create runnable files for virtualenv just because it doesn’t have enough permissions. Since it is not showing permission error, it is taking time to resolve it. You can use following command to install it.

sudo python -m pip install uwsgi
or
sudo pip install uwsgi

0👍

Note for mac’s that this could actually be because xcode requires you to accept the license agreement from the command line before it lets you run gcc

Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.

Leave a comment