LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-19-2017, 10:41 AM   #1
buymycorp
LQ Newbie
 
Registered: Mar 2017
Posts: 3

Rep: Reputation: Disabled
CentOS 7 w/KDE - Trying to get AWS CLI & Terraform installed


I just installed a new CentOS 7 w/KDE (I think I like Gnome better - but I digress) VM inside VMware Fusion 8.5.5.
I'm trying to follow these instructions: http://docs.aws.amazon.com/cli/lates...all-linux.html
You'd think that'd be easy. But I needed to look elsewhere for more detailed instructions in how to install Python-3.6.0:
http://www.tecmint.com/install-python-in-linux/

Insert newb whining, is it just me or do ALL the Linux instructions (ever written) forget to explicitly tell you WHERE to install things? I mention this because my root problem feels like my $PATH variable isn't seeing Pip (step #4 in the AWS CLI installation instructions). I can't get passed that - so I'm no closer to install AWS CLI or Terraform.

My (not so) educated guess was to install Python in /usr/local/bin (notice that the AWS instructions mention ~/.local/bin - but all I see there is wheel - and I remember that from a post on using su - you need to be 'in the wheel'). So ~/.local/bin looks obviously wrong to me. I successfully downloaded the Python 3.6 tar ball to /usr/local/bin, and followed the instructions to the letter in that second Python URL. And I was met with what I hope is success.

$ python3 --version
Python 3.6.0

However, I was looking around I saw Python 2.7 in /usr/bin - and now I'm worried you are laughing and typing a post to tell me that oops - you need to start over. Note: do NOT be shy about just telling me to blow away this VM and start over - I don't really like KDE and I'm not afraid of starting over. Back to trying to follow the AWS instructions in /usr/local/bin

$ python3 get-pip.py --user
Requirement already up-to-date: pip in ./lib/python3.6/site-packages

It tells me to edit my .bash_profile and add the new directory to the path and the export $PATH. Did that with $ vi .bash_profile.

$ pip --version
:bash: $: command not found

I am out of ideas.
 
Old 03-19-2017, 07:06 PM   #2
buymycorp
LQ Newbie
 
Registered: Mar 2017
Posts: 3

Original Poster
Rep: Reputation: Disabled
I needed to do this:
$ yum install epel-release # I think this enables a specific Enterprise RPM source.

That allowed me to do this:

$ yum -y install python-pip
This worked

$ pip -V
pip 8.1.2 from /usr/lib/python2.7/site-packages (python 2.7)

Believe me, I'm thankful for finding this. But, I'd prefer 'pip' was associated to Python-3.6.0 NOT Python-2.7.

Anyone have any ideas?

Thank you.
 
Old 03-19-2017, 07:55 PM   #3
buymycorp
LQ Newbie
 
Registered: Mar 2017
Posts: 3

Original Poster
Rep: Reputation: Disabled
I think I have it now.
This is what I did.
$ yum remove python-pip

$ yum install python34-setuptools # I don't know if this was necessary. You might try 'easy_install-3.6 pip' first to see if you can just skip this step altogether.

$ easy_install-3.6 pip # Freaking finally!

$ which pip
/usr/local/bin/pip # for the first time it isn't either giving an error or pointing at the /usr/bin/ where Python 2.7 lives

$ pip -V # However, this gave me a weird error

$ pip3.6 install virtualenv # I have no idea what this does

$ pip -V # Still gave me a weird error

$ mkvirtualenv py3 # have no idea what this does

$ which python3 # My system finally recognizes python3 commands!
/usr/bin/python3/

$ export PATH=/usr/local/bin/pip:$PATH # You might try this prior to the (2) commands I entered that I have no idea what they did and see if pip works for you.

$ source ~/.bash_profile

$ pip -V
pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6) # This is the result I'm been fighting for all day!

Now I'll see if I can finally install the AWS CLI & Terraform!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: List of 71 AWS services and their use! AWS cloud terminology! LXer Syndicated Linux News 0 03-17-2017 02:35 PM
[SOLVED] I installed vsftpd, and killed my SSH access - AWS server cpt_howdy Linux - Networking 1 02-26-2014 08:21 AM
Amazon's AWS/EC2 CentOS instances cannot talk to each other ronbarak Linux - Networking 3 05-05-2013 04:27 AM
KDE installed in CentOS but refuses to start Arie Linux - Newbie 5 03-22-2013 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration