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的更多相关文章

  1. 安装Nginx+uWSGI+Django环境

    Ubuntu Server 12.04 安装Nginx+uWSGI+Django环境 今天要介绍的是利用APT源直接apt-get install安装配置我们所需要的环境,首先按惯例先安装MySQL和 ...

  2. python2.7安装beautifulsoup包

    python2.7安装beautifulsoup包 准备条件: 1.已经安装好python2.7 2.下载beautifulsoup包,选择合适的包,网址:https://www.crummy.com ...

  3. python2.7安装mysql-python

    环境:python2.7.14+mysql-python-1.2.3.win-amd64-py2.7.exe 安装版本许参照解释器版本,有64和32位之分,如果安装错误版本,则运行时会报错:Impor ...

  4. Atitti python2.7安装 numpy attilax总结

    Atitti python2.7安装 numpy attilax总结 1.1. easy_install 安装模式,没有 easy_install ,先手动安装1 1.2. 安装setuptools ...

  5. python2在安装pywin32后出现ImportError: DLL load failed 解决方法

    python2在安装pywin32后出现ImportError: DLL load failed 解决方法 在python2中有时候会出现: import win32api   ImportError ...

  6. win7 64位环境下,为python2.7 安装pip

    第一步: 安装python并配置好环境变量 参见:http://blog.csdn.net/donggege214/article/details/52062855 第二步: 下载setuptools ...

  7. 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 ...

  8. 在Win10下,python3和python2同时安装并解决pip共存问题

    前提 本文是在Windows64位系统下进行的,32位系统请下载相应版本的安装包,安装方法类似. 在Win10下,python3和python2同时安装并解决pip共存问题解决: 1.下载python ...

  9. centos7下python2环境安装pip2、kazoo、bottle、beaker

    摘自:https://mp.weixin.qq.com/s?src=11&timestamp=1576355125&ver=2034&signature=mNp2na6VjFz ...

随机推荐

  1. CodeCraft-19 and Codeforces Round #537 (Div. 2) 题解

    传送门 D. Destroy the Colony 首先明确题意:除了规定的两种(或一种)字母要在同侧以外,其他字母也必须在同侧. 发现当每种字母在左/右边确定之后,方案数就确定了,就是分组的方案数乘 ...

  2. Java 调用翻译软件实现英文文档翻译

    前言: 因最近要进行OCP的考试准备.看着大堆英文文档确实有些疼痛.又因文档内容有点大,又需要逐一去翻译 又很费时费力.于是 百度了一番,找到一些 可以使用Java来调用百度翻译软件的API( 注:( ...

  3. java虚拟机内存不足,“Could not create the Java Virtual Machine”问题解决方案

    java虚拟机内存不足,"Could not create the Java Virtual Machine"问题解决方案 在运行java程序时,遇到问题"Could n ...

  4. js获取url参数值,并解决中文乱码

    <script type="text/javascript"> function GetQueryString(name) { var reg = new RegExp ...

  5. 初识ActiveMQ

    消息中间件的初步认识 什么是消息中间件? 消息中间件是利用高效可靠的消息传递机制进行平台无关的数据交流,并基于数据通信来进行分布式系统的集成.通过提供消息传递和消息排队模型,可以在分布式架构下扩展进程 ...

  6. 【python】gevent协程例子

    说在前面:用协程还是多线程需要仔细考量.我在做实验时请求了100w个ip,分别用pool为1000的协程和64个线程来跑,结果是多线程的速度是协程的10倍以上. 一个简单的协程例子 #!/usr/bi ...

  7. hdu4612 卡cin e-DCC缩点

    /* 给定无向图,求加入一条边后最少剩下多少桥 */ #include<bits/stdc++.h> using namespace std; #define maxn 200005 #d ...

  8. linux下搭建SVN

      官网下载: http://subversion.apache.org/packages.html SVN客户端:TortoiseSVN :https://tortoisesvn.net/downl ...

  9. vue 在.vue文件里监听路由

    监听路由  watch   $route vue项目中的App.vue 文件 <template> <div id="app"> <!--includ ...

  10. Java和C冒泡排序

    Java 示例代码: public class test { public static void main(String[] args) { String str = "321dca5&q ...