python-inotify 在linux上安装
来源:互联网 发布:网络监控软件客户端 编辑:程序博客网 时间:2024/06/06 07:06
python-inotify 在linux上安装
0 下载
$ wget --no-check-certificate https://pypi.python.org/packages/source/p/pathlib/pathlib-1.0.1.tar.gz$ wget --no-check-certificate https://bitbucket.org/JanKanis/python-inotify/get/2193c8bdeb3b.zip
1 Ubuntu14.04
python2.7.6
gcc4.8.2
1.1 pathlib
$ cd pathlib-1.0.1$ sudo python setup.py install
1.2 python-inotify
$ cd JanKanis-python-inotify-2193c8bdeb3b$ sudo python setup.py install
1.3 测试
$ cd JanKanis-python-inotify-2193c8bdeb3b/examples$ python simple.py
2 RHEL6.4
python2.7.9. 如何升级python参考:
http://blog.csdn.net/ubuntu64fan/article/details/45248695
gcc-4.4.7
2.1 pathlib
# cd pathlib-1.0.1# python setup.py install
2.2 python-inotify
# cd JanKanis-python-inotify-2193c8bdeb3b# python setup.py install
出现IN_EXCL_UNLINK错误, 在JanKanis-python-inotify-2193c8bdeb3b/inotify/_inotify.c的开头添加下面的代码:
/* _inotify.c */.../* Exclude events on unlinked objects. */#ifndef IN_EXCL_UNLINK# define IN_EXCL_UNLINK 0x04000000#endif
3 RHEL5.4
python2.5
gcc-4.1.x
3.1 首先升级python
1) 从源码安装依赖zlib-devel:
## get zlib-devel source and build install it$ wget --no-check-certificate http://zlib.net/zlib-1.2.8.tar.gz$ tar -zxf zlib-1.2.8.tar.gz$ cd zlib-1.2.8$ ./configure$ make && make install#### /usr/local/include/zlib.h zconf.h
2) 从源码安装依赖python-devel:
$ wget --no-check-certificate https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz$ tar -zxf Python-2.7.9.tgz$ cd Python-2.7.9$ ./configure -–with-zlib=/usr/local/include --enable-unicode=ucs4$ make && make install## test:$ python>>> import zlib--enable-unicode=ucs4太重要了, 如果不指定这个, 安装python-inotify后运行测试程序simple.py时会出现错误:
ERROR: undefined symbol: PyUnicodeUCS4_FromFormat
3.2 安装python-inotify
参考2.1, 2,2.
0 0
- python-inotify 在linux上安装
- Python在Linux上安装
- 在linux上安装python
- linux在python上的编译安装
- HDFS inotify:Linux inotify机制在HDFS中的实现
- 使用setuptools在linux上安装python模块
- Python 2.7.6 在 linux 上的编译安装
- 在Linux CentOS 6.6上安装Python 2.7.9
- 在Linux CentOS 6.6上安装Python 2.7.9
- 如何在Linux上为Python语言安装Redis客户端
- 在Linux CentOS 6.6上安装Python 2.7.9
- 在Linux CentOS 6.6上安装Python 2.7.9
- 在Linux CentOS 6.6上安装Python 2.7.9
- 在Linux CentOS 上安装Python 2.7.9
- 在Linux CentOS 6.8上安装Python 2.7.12
- 在Linux CentOS 6.6上安装Python 2.7.9
- 在Linux CentOS 6.x上安装Python 2.7.9
- 在Linux CentOS 6.6上安装Python 2.7.9
- 为什么要使用SLF4J而不是Log4J
- 如何解决绘图过程中的闪烁
- LeetCode-BFS(广度优先搜索)总结
- Posix共享内存区(chapter 13)
- iOS设计模式-中介模式
- python-inotify 在linux上安装
- android应用程序如何调用支付宝接口
- POJ2391
- 洞悉linux下的Netfilter&iptables:iptables命令行工具源码解析【上】
- tolua++ 编译库
- Git详解之三:Git分支
- SpringMVC原理
- Step into MongoDB - 07 - 复杂查询
- php类的封装、继承和多态的简单理解