stephenmcd / django-socketio

WebSockets for Django
BSD 2-Clause "Simplified" License
1.32k stars 244 forks source link

Can't install django-socketio on mac OSX el capitan #84

Closed vivek1729 closed 8 years ago

vivek1729 commented 9 years ago

Running sudo pip install -U django-socketio gives me the following error:

libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
        int ecb_unused ocur_ = (cur);                                     \
                       ^
  14 warnings and 1 error generated.
  error: command 'cc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for gevent
  Running setup.py bdist_wheel for greenlet
  Stored in directory: /Users/vivekpradhan/Library/Caches/pip/wheels/08/9c/52/3d8ee766d654c43b131dcc954f255f8c6270bef617da0ac3e6
Successfully built django-socketio gevent-socketio gevent-websocket greenlet
Failed to build gevent
Installing collected packages: greenlet, gevent, gevent-websocket, gevent-socketio, sphinx-me, django-socketio
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/basecommand.py", line 223, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/commands/install.py", line 299, in run
    root=options.root_path,
  File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_set.py", line 646, in install
    **kwargs
  File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_install.py", line 813, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_install.py", line 1008, in move_wheel_files
    isolated=self.isolated,
  File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/wheel.py", line 371, in move_wheel_files
    clobber(source, dest, False, fixer=fixer, filter=filter)
  File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/wheel.py", line 282, in clobber
    ensure_dir(dest)  # common for the 'include' path
  File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/utils/__init__.py", line 70, in ensure_dir
    os.makedirs(path)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 1] Operation not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/greenlet'
vivek1729 commented 9 years ago

For others facing a similar issue doing this sudo CFLAGS='-std=c99' pip install -U django-socketio works for me. Reference - http://stackoverflow.com/questions/32417141/cant-install-gevent-osx-10-11