mod-wsgi==4.5.5 installation errors in Windows 10

31 views
Skip to first unread message

Sam

unread,
Jun 8, 2020, 6:44:47 AM6/8/20
to modwsgi
Hi, 

I have one thing related to mod-wsgi==4.5.5 installation. My operating system is Windows 10. As suggested in some resources, I first installed the latest version visual C++, downloaded from https://www.apachelounge.com/download/, and then installed apache from the same link, before doing the installation of mod-wsgi. After that, I opened anaconda prompt under python 2.7 environment and then tried to install mod-wsgi using "pip install mod-wsgi==4.5.5". But I received the following error: 

{
ERROR: Command errored out with exit status 1:
     command: 'C:\Users\...\Anaconda3\envs\python27\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\sunpi\\appdata\\local\\temp\\pip-install-gf4mno\\mod-wsgi\\setup.py'"'"'; __file__='"'"'c:\\users\\...\\appdata\\local\\temp\\pip-install-gf4mno\\mod-wsgi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'c:\users\sunpi\appdata\local\temp\pip-install-gf4mno\mod-wsgi\pip-egg-info'
         cwd: c:\users\sunpi\appdata\local\temp\pip-install-gf4mno\mod-wsgi\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\...\appdata\local\temp\pip-install-gf4mno\mod-wsgi\setup.py", line 139, in <module>
        'missing Apache httpd server packages.' % APXS)
    RuntimeError: The 'apxs' command appears not to be installed or is not executable. Please check the list of prerequisites in the documentation for this package and install any missing Apache httpd server packages.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
}

The reason why I wanted to install old version wsgi is because I need it to be compatible with django 1.11 so that I can install this app, https://github.com/gtfierro/walkthedinosaur
It took me over one week to get around this issue but I'm still unable to resolve this issue. Would you mind helping me? 

Thank you, 

Sam

Graham Dumpleton

unread,
Jun 8, 2020, 7:10:54 AM6/8/20
to mod...@googlegroups.com
Newest versions of mod_wsgi would also be compatible with Django 1.11. Not sure why you think you need an old version.

As to your issue, looks like Anaconda Python isn't for some reason reporting itself as being Windows.

That is:

    import os
    if os.name == 'nt':
        ...

is failing.

As a start, can you use the latest mod_wsgi version and see if it is any different.

Graham

--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/4f9a3751-b927-4c4f-b95e-54fee5b360aeo%40googlegroups.com.

Sam

unread,
Jun 8, 2020, 1:33:53 PM6/8/20
to modwsgi
Dear Graham Dumpleton, 

Thanks for your reply. 

Based on your suggestion, I successfully installed modwsgi. But when I ran 
"python manage.py migrate
 python manage.py runserver" in the anaconda, I received the following error relevant to modwsgi, 

Performing system checks...

{'host': u'', 'user': u'', 'pass': u'', 'type': u'sqlite', 'db': u'E:\\Programming\\Github\\software\\walkthedinosaur/USPTO_2005-2013_data.sqlite3', 'port': u'8080', 'local': True}
2020-06-08 13:22:59,155 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS VARCHAR(60)) AS anon_1
2020-06-08 13:22:59,158 INFO sqlalchemy.engine.base.Engine ()
2020-06-08 13:22:59,161 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS VARCHAR(60)) AS anon_1
2020-06-08 13:22:59,161 INFO sqlalchemy.engine.base.Engine ()
2020-06-08 13:22:59,167 INFO sqlalchemy.engine.base.Engine SELECT name FROM sqlite_master WHERE type='table' ORDER BY name
2020-06-08 13:22:59,167 INFO sqlalchemy.engine.base.Engine ()
System check identified some issues:

WARNINGS:
?: (urls.W002) Your URL pattern '^/?$' has a regex beginning with a '/'. Remove this slash as it is unnecessary. If this pattern is targeted in an include(), ensure the include() pattern has a trailing '/'.

System check identified 1 issue (0 silenced).
June 08, 2020 - 13:22:59
Django version 1.11, using settings 'walkthedinosaur.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
Unhandled exception in thread started by <function wrapper at 0x0000000004A2DC18>
Traceback (most recent call last):
  File "C:\...\Anaconda3\envs\python27\lib\site-packages\django\utils\autoreload.py", line 227, in wrapper
    fn(*args, **kwargs)
  File "C:\...\Anaconda3\envs\python27\lib\site-packages\django\core\management\commands\runserver.py", line 147, in inner_run
    handler = self.get_handler(*args, **options)
  File "C:\...\Anaconda3\envs\python27\lib\site-packages\django\contrib\staticfiles\management\commands\runserver.py", line 27, in get_handler
    handler = super(Command, self).get_handler(*args, **options)
  File "C:\...\Anaconda3\envs\python27\lib\site-packages\django\core\management\commands\runserver.py", line 68, in get_handler
    return get_internal_wsgi_application()
  File "C:\...\Anaconda3\envs\python27\lib\site-packages\django\core\servers\basehttp.py", line 57, in get_internal_wsgi_application
    sys.exc_info()[2])
  File "C:\...\Anaconda3\envs\python27\lib\site-packages\django\core\servers\basehttp.py", line 47, in get_internal_wsgi_application
    return import_string(app_path)
  File "C:\...\Anaconda3\envs\python27\lib\site-packages\django\utils\module_loading.py", line 20, in import_string
    module = import_module(module_path)
  File "C:\...\Anaconda3\envs\python27\lib\importlib\__init__.py", line 37, in import_module
    __import__(name)
django.core.exceptions.ImproperlyConfigured: WSGI application 'walkthedinosaur.wsgi.application' could not be loaded; Error importing module: 'No module named wsgi'


It looks like that the wsgi could not be found. How shall I fix this issue?

Thank you,

Sam
To unsubscribe from this group and stop receiving emails from it, send an email to mod...@googlegroups.com.

Graham Dumpleton

unread,
Jun 8, 2020, 5:26:55 PM6/8/20
to mod...@googlegroups.com
Nothing about mod_wsgi should come into play with that and it is a Django specific problem. Suggest you ask on StackOverflow. Also check that WSGI_APPLICATION and BASE_DIR in your Django settings file is actually correct if you changed around the layout of the project directory and where things live.

To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/2854a3c6-595c-402e-aef3-b8094a8f81aco%40googlegroups.com.

Pin Sun

unread,
Jun 8, 2020, 9:27:57 PM6/8/20
to mod...@googlegroups.com
I got it. Thank you. 

You received this message because you are subscribed to a topic in the Google Groups "modwsgi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/modwsgi/YLiuSM8aX5g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to modwsgi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/9ABB5475-9C21-4C00-ACF5-2451D0CF8490%40gmail.com.
Reply all
Reply to author
Forward
0 new messages