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 ...
随机推荐
- python第一天,编写用户接口
作业:编写登陆接口 输入用户名密码 认证成功后显示欢迎信息 输错三次后锁定 流程图: 代码 #!/usr/bin/env python #-*- coding:utf-8 -*- #created b ...
- LuoGu P2835 刻录光盘
题目传送门 这个题和消息扩散那个题,一模一样啊 除了数据范围小一点,搜索能过之外,没啥区别 但是我写WA了QwQ不知道为什么 和消息扩散的代码fc/diff了半天也没找出来哪不一样 换了输入就过了反正 ...
- 初步了解three.js
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...
- IOS 颜色的宏定义
#define RGB(r, g, b, a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a] self.vie ...
- Confluence 6 配置服务器基础地址备注
使用不同 URL.如果你配置了不同的基础 URL 地址或者你站点的访问者使用了不同的 URL 地址来访问你的 Confluence 地址,你有很大概率可能会受到错误信息. 修改上下文地址.如果你修改了 ...
- Confluence 6 注册单一小工具
如果你不能订阅一个应用的小工具,你需要将小工具一个一个的添加进来.针对网站不支持小工具订阅和你的应用和你的 Confluence 不能建立信任连接的情况,你就只能这样添加了. 首先你需要获得小工具的 ...
- 第八单元 正文处理命令及tar命令
使用cat命令进行文件的纵向合并 两种文件的纵向合并方法 归档文件和归档技术 归档的目的 什么是归档 tar命令的功能 tar命令的常用选项 使用tar命令创建.查看及抽取归档文件 使用tar命令 ...
- LeetCode(67):二进制求和
Easy! 题目描述: 给定两个二进制字符串,返回它们的和(用二进制表示). 输入为非空字符串且只包含数字 1 和 0. 示例 1: 输入: a = "11", b = " ...
- Python字典(Dictionary)
Python中字典与类表类似,也是可变序列,不过与列表不同,他是无序的可变序列,保存的内容是以键 - 值对的形式存放的.类似我们的新华字典,他可以把拼音和汉字关联起来,通过音节表可以快速的找到想要的字 ...
- windows下使用Play框架
play类似于Spring这里的web框架.特点:MVC.函数编程. 版本:play 2.1.3 一.play命令 #play ~compile 功能:持续编译.在cmd中运行这个命令,只要 ...