Py学习  »  问与答

windows 下部署 django程序 安装 Uwsgi 报错 ‘module’ object has no attribute 'uname'

初行者 • 10 年前 • 17358 次点击  

部署django :找到两种方式 :一、uwsgi + nginx

   背景:django 1.8  python 2.7.10 
   遇到问题:pip  install uwsgi 安装不成功 提示 'module' object has no attribute 'uname'

                                      二、Apache + wsgi
    背景:Apache 未找到2.4版本.exe文件安装,是.zip解压缩 cmd 安装方式,无法正常启动。配置方式如下

     WSGIScriptAlias / /Automation/ReportServer/src/ReportServer/wsgi.py(项目中wsgi文件路径)

WSGIPythonPath /Automation/ReportServer/src(项目路径) Alias /static/ /Automation/ReportServer/src/ReportServer/static/ (static文件路径) <Directory /Automation/ReportServer/src/ReportServer/static> Require all granted </Directory> <Directory /Automation/ReportServer/src/ReportServer/> <Files wsgi.py> Require all granted </Files> </Directory>

    两种方式一种都没有安装成功,挺心塞的,我是个新手,也不知道问题表达的清楚吗,您是大神吗?会帮我解答一下吗?谢谢您!
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/1372
文章 [ 1 ]  |  最新文章 10 年前
zhanxueyou
Reply   •   1 楼
zhanxueyou    10 年前

uwsgi并没有适合Windows的安装版本。

os.uname()这个function在Windows版本中是没有的,所以Windows中uwsgi目前应该是无法安装的。

Python(python3.4.3)的文档中明确说明os.uname()只适用于Unix,并不适用于Windows,想安装uwsgi还是使用Linux吧。