Install python packages on OpenShift(在 OpenShift 上安装 python 包)
问题描述
我正在尝试在 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 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 OpenShift 上安装 python 包


基础教程推荐
- 使用PyInstaller后在Windows中打开可执行文件时出错 2022-01-01
- 线程时出现 msgbox 错误,GUI 块 2022-01-01
- 如何在海运重新绘制中自定义标题和y标签 2022-01-01
- 用于分类数据的跳跃记号标签 2022-01-01
- 如何让 python 脚本监听来自另一个脚本的输入 2022-01-01
- 筛选NumPy数组 2022-01-01
- Dask.array.套用_沿_轴:由于额外的元素([1]),使用dask.array的每一行作为另一个函数的输入失败 2022-01-01
- Python kivy 入口点 inflateRest2 无法定位 libpng16-16.dll 2022-01-01
- 何时使用 os.name、sys.platform 或 platform.system? 2022-01-01
- 在 Python 中,如果我在一个“with"中返回.块,文件还会关闭吗? 2022-01-01