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 ...
随机推荐
- 洛谷P3247 [HNOI2016]最小公倍数 [分块,并查集]
洛谷 思路 显然,为了达到这个最小公倍数,只能走\(a,b\)不是很大的边. 即,当前询问的是\(A,B\),那么我们只能走\(a\leq A,b\leq B\)的边. 然而,为了达到这最小公倍数,又 ...
- Codeforces 1039D You Are Given a Tree [根号分治,整体二分,贪心]
洛谷 Codeforces 根号分治真是妙啊. 思路 考虑对于单独的一个\(k\)如何计算答案. 与"赛道修建"非常相似,但那题要求边,这题要求点,所以更加简单. 在每一个点贪心地 ...
- html<meta>标签
1. 定义说明 <meta>提供与页面有关的元数据,元数据是对数据的描述 <meta>总是位于<head></head>中 <meta>定义 ...
- Confluence 6 编辑和删除用户宏
编辑一个用户宏 希望对一个用户宏进行编辑: 进入 > 基本配置(General Configuration) > 用户宏(User Macros) 在相关的宏的边上,单击 编辑(Edit ...
- 一个简单的 vue.js 实践教程
https://segmentfault.com/a/1190000006776243?utm_source=tuicool&utm_medium=referral 感觉需要改善的地方有: ( ...
- medir设置
setting中 MEDIA_URL="/media/"MEDIA_ROOT=os.path.join(BASE_DIR, "app01","medi ...
- 20165314 2016-2017-2 《Java程序设计》第3周学习总结
20165314 2016-2017-2 <Java程序设计>第3周学习总结 教材学习内容总结 类体包含成员变量和域变量 局部变量只在方法内有效 对象的创建以及对象对自己变量和方法通过用. ...
- 在一些开源框架中,dist文件夹是什么意思
全称是distribution. distribution英 [dɪstrɪ'bjuːʃ(ə)n]美 ['dɪstrə'bjʊʃən]: 发行版 n. 分布:分配 在某些框架中,因为开发和发布是的内容 ...
- pycharm提示This inspection detects instance attribute definition outside __init__ method
示例代码: class MiNiCarStore(CarStore): def createCar(self, typeName): self.carFactory = CarFactory() # ...
- Gson解决字段为空是报错的问题
json解析有很多工具,这里说的是最常用也是解析速度最快的Gson,Gson是google家出的,有一个缺点就是无法设置null替换, 我们只能手动的批量替换服务器返回的null了,正常的接口定义的时 ...