python2.7安装和uwsgi
python2.7安装和uwsgi
tar zxf Python-2.7.13xxxx# 这里,必须用–enable-shared,生成动态库,否则会遇到wsgi不能编译的问题。
Bonus: multiple Python versions for the same uWSGI binary
As we have seen, uWSGI is composed of a small core and various plugins. Plugins can be embedded in the binary or loaded dynamically. When you build uWSGI for Python, a series of plugins plus the Python one are embedded in the final binary.
This could be a problem if you want to support multiple Python versions without building a binary for each one.
The best approach would be having a little binary with the language-independent features built in, and one plugin for each Python version that will be loaded on-demand.
In the uWSGI source directory:
make PROFILE=nolang
This will build a uwsgi binary with all the default plugins built-in except the Python one.
Now, from the same directory, we start building Python plugins:
PYTHON=python3.4 ./uwsgi --build-plugin "plugins/python python34" PYTHON=python2.7 ./uwsgi --build-plugin "plugins/python python27" PYTHON=python2.6 ./uwsgi --build-plugin "plugins/python python26"
You will end up with three files: python34_plugin.so, python27_plugin.so, python26_plugin.so. Copy these into your desired directory. (By default, uWSGI searches for plugins in the current working directory.)
Now in your configurations files you can simply add (at the very top) the plugins-dir and plugin directives.
[uwsgi] plugins-dir = <path_to_your_plugin_directory> plugin = python26
This will load the python26_plugin.so plugin library from the directory into which you copied the plugins.
python2.7安装和uwsgi的更多相关文章
- 安装Nginx+uWSGI+Django环境
Ubuntu Server 12.04 安装Nginx+uWSGI+Django环境 今天要介绍的是利用APT源直接apt-get install安装配置我们所需要的环境,首先按惯例先安装MySQL和 ...
- python2.7安装beautifulsoup包
python2.7安装beautifulsoup包 准备条件: 1.已经安装好python2.7 2.下载beautifulsoup包,选择合适的包,网址:https://www.crummy.com ...
- python2.7安装mysql-python
环境:python2.7.14+mysql-python-1.2.3.win-amd64-py2.7.exe 安装版本许参照解释器版本,有64和32位之分,如果安装错误版本,则运行时会报错:Impor ...
- Atitti python2.7安装 numpy attilax总结
Atitti python2.7安装 numpy attilax总结 1.1. easy_install 安装模式,没有 easy_install ,先手动安装1 1.2. 安装setuptools ...
- python2在安装pywin32后出现ImportError: DLL load failed 解决方法
python2在安装pywin32后出现ImportError: DLL load failed 解决方法 在python2中有时候会出现: import win32api ImportError ...
- win7 64位环境下,为python2.7 安装pip
第一步: 安装python并配置好环境变量 参见:http://blog.csdn.net/donggege214/article/details/52062855 第二步: 下载setuptools ...
- centos 6.x Python2.7x安装
centos 6.x Python2.7x安装 yum install -y gcc gcc-develwget https://www.python.org/ftp/python/2.7.14/Py ...
- 在Win10下,python3和python2同时安装并解决pip共存问题
前提 本文是在Windows64位系统下进行的,32位系统请下载相应版本的安装包,安装方法类似. 在Win10下,python3和python2同时安装并解决pip共存问题解决: 1.下载python ...
- centos7下python2环境安装pip2、kazoo、bottle、beaker
摘自:https://mp.weixin.qq.com/s?src=11×tamp=1576355125&ver=2034&signature=mNp2na6VjFz ...
随机推荐
- 反转链表算法Java实现
之前遇到反转链表的算法,比较晦涩难解,但其实挺简单的. 目标:将一个顺序链表反转. 思路:用三个辅助节点,每次实现一个节点的指向反转,即他的后继变为他的前驱. 三个辅助节点: p q r 按顺序 ...
- swift 学习- 20 -- 错误处理
// 错误处理 是响应错误以及 从错误中恢复的过程, Swift 提供了在运行时对 可恢复错误的 抛出, 捕获, 传递 和 操作的支持 // 某些操作无法保证总是执行完所有代码 或总是生层有用结果, ...
- Confluence 6 数据导入和导出
Confluence 管理员和用户可以从各种方法向 Confluence 中导入数据.针对不同的导入方式,有关权限的要求也是不相同的.请参考页面 Import Content Into Conflu ...
- Confluence 6 用户宏示例 - NoPrint
这个示例演示了如何创建一个用户宏,这个宏包括了在查看页面中显示的内容,但是不被打印. Macro name noprint Visibility Visible to all users in the ...
- RefineDet算法笔记
---恢复内容开始--- 一.创新点 针对two-stage的速度慢以及one-stage精度不足提出的方法,refinedet 包括三个核心部分:使用TCB来转换ARM的特征,送入ODM中进行检测: ...
- vue中 裁剪,预览,上传图片 的插件
参考地址: https://github.com/dai-siki/vue-image-crop-upload
- Appium 如何模拟按键
from appium.webdriver import Remote driver.keyevent(4) python中点击返回键是这样写的 附录 keycode 电话键 KEYCODE_CALL ...
- Centos7上配置网络和本地yum方法
配置网络yum源 前提:1.这个系统能上网 2.vim /etc/resolv.conf nameserver 8.8.8.8 nameserver 114.114.114.114 操作如下: 1.m ...
- Nginx配置笔记
配置资源的缓存周期 location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { root www; expires 3560d; } loca ...
- asp.net core 验证码方案
/// <summary> /// 图片验证码 /// </summary> public class VerificationCodeServices { /// <s ...