- 论坛徽章:
- 0
|
本帖最后由 viczzx 于 2013-12-06 10:23 编辑
我是按照README.md上的步骤进行操作的
1. $ sudo python setup.py install
2. $ python # run into python prompt, the version of mine is Python 2.7.3
3. >>> from fdfs_client.client import*
到这就出现了错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "fdfs_client/client.py", line 14, in <module>
from fdfs_client.storage_client import *
File "fdfs_client/storage_client.py", line 12, in <module>
from fdfs_client.sendfile import *
ImportError: No module named sendfile
上面说的是fdfs_client中没有sendfile模块,在编译好的 build/lib.linux-x86_64-2.7/fdfs_client/ 中确实没有sendfile.py模块,只有sendfile.so文件,我看到源文件中sendfile.c 是C语言写的,在执行 sudo python setup.py install 的时候,确实也显示了 build extention module sendfile 这样的提示,但是最后确实还是用不了,我的Python版本是2.7.3,在Ubuntu 12.04下。
所以,这个问题是由于版本问题吗?怎样解决这个问题呢?为什么用C语言来写sendfile模块呢?怎样使用sendfile模块呢?
谢谢!!! |
|