推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
chilaoqi
V2EX  ›  Python

有没有类似 psutil 但是不需要 gcc 依赖的 Python 库呢?

  •  
  •   chilaoqi · Jun 17, 2016 · 3678 views
    This topic created in 3787 days ago, the information mentioned may be changed or developed.

    psutil , PSI 虽然都很好用,但是安装需要 gcc 依赖,对于每个新环境很麻烦呀,再是个内网。。。

    即使通过 wheel ,每个环境还要保证一致才可以,这个很难做到吧。

    Google 了一圈没有找到类似的,希望大牛指点下。不想自己解析 proc 或者命令行输出啊, eggache

    4 replies  •  2016-06-17 15:22:32 +08:00
    SlipStupig
        1
    SlipStupig  
       Jun 17, 2016
    用 docker 打好不就行了?
    chilaoqi
        2
    chilaoqi  
    OP
       Jun 17, 2016
    @SlipStupig docker 也需要内核版本支持。。。我记得还必须是 64 位机器。。。这要求似乎比安装 gcc 还多。

    就没有一个 pure python 的库么?
    fds
        3
    fds  
       Jun 17, 2016
    这些都是系统调用,为了跨平台也没什么好方法吧,毕竟 python 自己不带。
    估计有单纯 python 的但是会限制在 unix 上,然后就是解析命令行。
    SlipStupig
        4
    SlipStupig  
       Jun 17, 2016
    @chilaoqi 可以写编译好了然后使用指定路径,具体可以看 requests 调用 urllib3
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4869 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 06:55 · PVG 14:55 · LAX 23:55 · JFK 02:55
    ♥ Do have faith in what you're doing.