問題描述
我正在嘗試在 OpenShift 上安裝 python 包,但我發現有關執行此操作的最佳方法的頁面很少.有人可以建議說 oauth2
和 simplejson
的最佳方式.我嘗試將這些包含在 setup.py
中,但我不知道這些是否真的可用,或者我必須上傳并指向路徑.我該怎么做?
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 oauth2
and simplejson
. I've tried including these in the setup.py
, but I have no idea whether these are actually available or I'll have to upload and point to the path. How can I do this?
推薦答案
你安裝了 rhc
(OpenShift.com 制作)嗎?
如果沒有,請在 OpenShift.com 上查看:安裝 OpenShift RHC 客戶端工具
Did you install rhc
(made by OpenShift.com) ?
If not then see on OpenShift.com: Installing OpenShift RHC Client Tools
現在你可以使用 rhc
訪問服務器了
Now you can access server with rhc
rhc ssh
然后你可以照常做:
檢查python版本(帶大V)
checking python version (with big V)
python -V
檢查 pip 版本(帶大 V)
checking pip version (with big V)
pip -V
檢查已安裝的模塊
pip freeze
搜索模塊
pip search simplejson
pip search json | sort # sorted result
安裝新模塊
pip install simplejson
和其他 linux/bash 函數
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
這篇關于在 OpenShift 上安裝 python 包的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!