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

Gunicorn can't run in virtualenv on Win7 #1005

Closed
DJviolin opened this issue Apr 9, 2015 · 2 comments
Closed

Gunicorn can't run in virtualenv on Win7 #1005

DJviolin opened this issue Apr 9, 2015 · 2 comments

Comments

@DJviolin
Copy link

DJviolin commented Apr 9, 2015

I got the following error on Win7 when I try to run the gunicorn server inside virtualenv:

$ (myappvenv) C:\www\python\myapp> gunicorn -b 0.0.0.0:8080 wsgi
Traceback (most recent call last):
File "C:\Python34\Lib\runpy.py", line 170, in _runmoduleasmain
"main", modspec)
File "C:\Python34\Lib\runpy.py", line 85, in _runcode
exec(code, runglobals)
File "C:\www\python\myapp\myappvenv\Scripts\gunicorn.exe_main.py", line 5, in <module>
File "C:\www\python\myapp\myappvenv\lib\site-packages\gunicorn\app\wsgiapp.py", line 10, in <module>
from gunicorn.app.base import Application
File "C:\www\python\myapp\myappvenv\lib\site-packages\gunicorn\app\base.py", line 12, in <module>
from gunicorn import util
File "C:\www\python\myapp\myappvenv\lib\site-packages\gunicorn\util.py", line 9, in <module>
import fcntl
ImportError: No module named 'fcntl'

My wsgi.py file looks like this:

def application(env, start_response):
    start_response('200 OK', [('Content-Type', 'text/html')])
    return ["Hello!"]

Using the wsgi file from the Gunicorn readthedocs site also not helping, throwing the same error:

def app(environ, start_response):
    """Simplest possible application object"""
    data = 'Hello, World!\n'
    status = '200 OK'
    response_headers = [
        ('Content-type','text/plain'),
        ('Content-Length', str(len(data)))
    ]
    start_response(status, response_headers)
    return iter([data])

Pip versions inside virtualenv:

$ (my_app_venv) C:\www\python\my_app> pip list
gunicorn (19.3.0)
pip (6.1.1)
setuptools (15.0)

Pip versions globally:

$ C:\www\python\my_app> pip list
pbr (0.10.8)
pip (6.1.1)
setuptools (15.0)
six (1.9.0)
stevedore (1.3.0)
virtualenv (12.1.1)
virtualenv-clone (0.2.5)
virtualenvwrapper (4.3.2)

Python version: 3.4.3

@berkerpeksag
Copy link
Collaborator

Thanks for the report. I'm not a Windows user, but I think Gunicorn does not support Windows yet. See #524.

@berkerpeksag
Copy link
Collaborator

Closing this as a duplicate of #524.

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

2 participants