简体   繁体   中英

Boto: Unable to install on CentOS

so i have been trying to install boto on CentOS . I have installed python 2.6 using this steps

    sudo wget https://www.python.org/ftp/python/2.6.6/Python-2.6.6.tgz
     tar -zxvf Python-2.6.6.tgz
     cd Python-2.6.6
./configure && make && make install

python --version
Python 2.6.6
which python 
/usr/local/bin/python

after which i installed

sudo yum install python-pip

and then boto

python-pip install boto

But when i do import boto , I get error ImportError: No module named boto Can anyone help ? PS: when i do

sudo pip install -U boto 

It says Requirement already up-to-date: boto in /usr/lib/python2.7/site-packages

Your pip uses python located at /usr/bin/python2 , but you use /usr/local/bin/python .

If you don't need in using python 2.6 just uninstall it. Then check that python binary is pointed to /usr/bin/python2 and try to run your script again. It should work.

If you need to use python 2.6 I think the easiest way is to uninstall python-pip package and then install pip using get-pip.py script according to this manual. After installing check that output of cat $(which pip) consists the right version of python ( /usr/local/bin/python in your case). Then reinstall boto using newly installed pip . After that I think all should work.

PS Unfortunetely I can't check precisely if this will work because I don't have install CentOS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM