The problem is that when I install python, I only soft link the python command. Actually I should link this directory to class path.
/Library/Frameworks/Python.framework/Versions/3.4/bin
Soft link in that directory
>sudo ln -s python3 python
>sudo ln -s pip3 pip
>pip -V
pip 1.5.6 from /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages (python 3.4)
Example of the configuration file https://github.com/rdegges/django-skel/blob/master/gunicorn.py.ini https://github.com/benoitc/gunicorn/blob/master/examples/example_config.py
>sudo gunicorn -c gunicorn.py.ini easypoll.wsgi
my configuration file should be as follow:
>cat gunicorn.py.ini
"""gunicorn WSGI server configuration.""" import multiprocessing bind = "127.0.0.1:8000" workers = multiprocessing.cpu_count() * 2 + 1
2.2 Install on ubuntu
Actually I should run it on ubuntu system or similar
>sudo apt-get install python-software-properties
>sudo apt-add-repository ppa:gunicorn/ppa
>sudo apt-get update
Not working on ubuntu14.04
>sudo add-apt-repository --remove ppa:gunicorn/ppa
>sudo apt-get install gunicorn
Error Message
>gunicorn -c gunicorn.py.ini easypoll.wsgi
Traceback (most recent call last): File "/usr/bin/gunicorn", line 5, in <module> from pkg_resources import load_entry_point File "<frozen importlib._bootstrap>", line 2214, in _find_and_load File "<frozen importlib._bootstrap>", line 2203, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 1191, in _load_unlocked File "<frozen importlib._bootstrap>", line 1161, in _load_backward_compatible File "/usr/local/lib/python3.4/dist-packages/setuptools-5.7-py3.4.egg/pkg_resources.py", line 2872, in <module> File "/usr/local/lib/python3.4/dist-packages/setuptools-5.7-py3.4.egg/pkg_resources.py", line 449, in _build_master File "/usr/local/lib/python3.4/dist-packages/setuptools-5.7-py3.4.egg/pkg_resources.py", line 745, in require File "/usr/local/lib/python3.4/dist-packages/setuptools-5.7-py3.4.egg/pkg_resources.py", line 639, in resolve pkg_resources.DistributionNotFound: gunicorn==17.5