Install python packages on OpenShift

后端 未结 2 525
暗喜
暗喜 2020-12-06 19:58

I\'m trying to install python packages on OpenShift but I see a dearth of pages about the best way to do this. Can someone please suggest the best way of getting on say

2条回答
  •  -上瘾入骨i
    2020-12-06 20:35

    Did you install rhc (made by OpenShift.com) ?
    If not then see on OpenShift.com: Installing OpenShift RHC Client Tools

    Now you can access server with rhc

    rhc ssh
    

    and then you can do as always:

    checking python version (with big V)

    python -V
    

    checking pip version (with big V)

    pip -V
    

    checking installed modules

    pip freeze
    

    searching module

    pip search simplejson
    
    pip search json | sort # sorted result
    

    installing new module

    pip install simplejson
    

    and other linux/bash functions

    ls
    ls -al
    echo "hello world"
    cd folder_name
    mkdir new_folder_name
    chmod +x filename
    cat filename
    grep 'hello' */*.py
    history
    nano filename
    for x in */* ; do echo $x ; done
    

提交回复
热议问题