惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
Last Week in AI
Last Week in AI
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
人人都是产品经理
人人都是产品经理
V
Visual Studio Blog
宝玉的分享
宝玉的分享
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
T
Tailwind CSS Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
量子位
博客园 - 聂微东
S
SegmentFault 最新的问题
博客园 - 司徒正美
罗磊的独立博客
V
V2EX
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
美团技术团队
小众软件
小众软件
Jina AI
Jina AI

博客园 - 文刀无尽

在Django 中更新mongodb的ListField字段 图片加到json中,提交到服务器端处理异常问题。 在django中使用时django-nonrel,'django.contrib.auth'不能用的问题 在mac 上安装 mpkg 在bluehost上安装mongodb Celery使用数据库代替rabbitmq 为什么要使用Rabbitmq 为android 启动的时候添加splash 折腾了半天,ajax 在模拟器下正常,在一台2.1机器上正常,在我的小米2.3下不工作 去掉默认标题栏且将应用设置为全屏 java 基本语法 在jquery mobile中页面跳转的时候,实现登录检查 去掉jquery mobile 的阴影效果 Eclipse 的 javascript 插件 iphone phonegap中跨域的问题 使用jquery mobile 经验 另类随机读大表数据 (原创)自已实现服务器控件之 TextBox 控件 (原创)自已实现服务器控件系列 之 设计时可用鼠标拖动大小的Label控件
在bluehost上安装pytoh 2.7.2
文刀无尽 · 2012-03-02 · via 博客园 - 文刀无尽

第一步,当然是先连接到shell上,先在cpanel的ssh/shell上启动shh.

我是用mac连的,打开terminal ,敲入:ssh 你在bluehost用户名@你的域名,然后再输入密码,就可以链接了。 

==以下是网上搜下来的安装步骤。 

After I discovered the presence of Python 2.6 on BlueHost, they decided to remove this installation by default. Fortunately it’s really simple to build Python from sources and install it (and naturally, the good thing is that all required packages to build Python are installed on BlueHost servers).
So here the steps to follow to build and install the python version you prefer (tested with Python 2.6 and 2.7.x).

1

2

wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz

tar xzvf Python-2.7.2.tgz

and, just a note, the package is well done and it will create a Python subfolder :)

After this we can already configure and install it.

1

2

3

4

cd Python-2.7.2

./configure -prefix=/home2/mornatin/python272 --enable-unicode=ucs4

make

make install

Change the Python version in this example and the installation directory with what you prefer. Naturally, considering you are on shared host (if you have a dedicated server you can install python using your distribution package system), you have access only to your home folder, so the target directory must be inside your home.
If all worked well, at the end of this procedure your python is correctly install in your system and you can start using it. To test you can just simply try to start the binary file

1

/home2/mornatin/python272/bin/python

A thing I can suggest, if you don’t want to override the BlueHost default python and/or if you want to install different python version, is to rename the python binary with something different. For example:

1

mv /home2/mornatin/python272/bin/python /home2/mornatin/python272/bin/python27

After this step you can add the python bin folder to your PATH and use it everywhere:

1

export PATH=/home2/mornatin/python272/bin:$PATH

All configured and you can start working with your new python version. An important thing to remember is that, if you haven’t python 2.7 (or other) configured as default python, when you want to install a new module in it, you should invoke the correctly binary file. Following this installation example:

1

python27 setup.py install