在OpenShift上安装python包 [英] Install python packages on OpenShift
问题描述
我正在尝试在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
rhc ssh
然后您可以照常做:
检查python版本(带有大V)
checking python version (with big V)
python -V
检查点子版本(带有大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包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!