Upgrade to python3 on CentOS

While working on machine learning, I faced issues to use NLTK 3. Event some libraries need python3 to run. I use alibaba cloud with centos6. Here are the steps to follow to install python 3.x and pip3

First, install minimum necessary tools:

$ sudo yum install yum-utils

Then using yum-builddep, set up a necessary build environment for python3 and install missing dependencies. The following command will automatically take care of that.

$ sudo yum-builddep python

Now download the latest python3 (e.g., python 3.5) from https://www.python.org/ftp/python/

$ curl -O https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz

Finally, build and install python3 as follows. The default installation directory is /usr/local. If you want to change this to some other directory, pass “–prefix=/alternative/path” parameter to configure before running make.

$ tar xf Python-3.5.0.tgz
$ cd Python-3.5.0
$ ./configure
$ make
$ sudo make install

This will install python3, pip3, setuptools as well as python3 libraries on your CentOS system.

$ python3 –version

alias python=’/usr/local/bin/python3.5′

Method Two: Install Python3 from EPEL Repository

The latest EPEL 7 repository offers python3 (python 3.4 to be exact). Thus if you are using CentOS 7 or later, you can easily install python3 by enabling EPEL repository as follows.

$ sudo yum install epel-release

Then install python 3.4 and its libraries using yum:

$ sudo yum install python34

Note that this will not install matching pip. To install pip and setuptools, you need to install them separately as follows.

$ curl -O https://bootstrap.pypa.io/get-pip.py
$ sudo /usr/bin/python3.4 get-pip.py

Method Three: Install Python3 from Software Collections (SCL)

Another way to install python3 is via enabling Software Collections (SCL) repository. The SCL repository is available for CentOS 6.5 or later, and the latest SCL offers python 3.3. Once you enable the SCL repository, go ahead and install python3 as follows.

$ sudo yum install python33

To use python3 from the SCL, you need to enable python3 on a per-command basis as follows.

$ scl enable python33 <command>

You can also invoke a bash shell with python3 enabled as the default Python interpreter:

$ scl enable python33 bash
Source: http://ask.xmodulo.com/install-python3-centos.html
How to use pip to use virtualenv for packages

python3 -m virtualenv pyeztask/

Enable .htaccess directive in httpd CentOS

Make sure AccessFileName set to .htaccess

Search httpd.conf for AccessFileName directive. It defines name of the distributed configuration file:

grep -i AccessFileName httpd.conf

Make sure users are allowed to use .htaccess file

What you can put in these files is determined by the AllowOverride directive. This directive specifies, in categories, what directives will be honored if they are found in a .htaccess file. If this directive is set to None, then .htaccess files are completely ignored. In this case, the server will not even attempt to read .htaccess files in the filesystem.

grep -i AllowOverride httpd.conf

When this directive is set to All, then any directive which has the .htaccess Context is allowed in .htaccess files: AllowOverride All

Save and close the file. Restart httpd:

service httpd restart

Are you scared of starting your own, then this post is for you?

Start your own business

Happy new year 2018 and its time to live your dream. Are you planning to start something new in 2018 and have already thought pros and cons about it. And finally family life, EMIs etc. Finally concluded lets wait for some more time and then will think of my own. Then this is the post for you. Here are collection of 37 quotes from famous people and will definitely give you adrenaline to get started.

  1. “Only put off until tomorrow what you are willing to die having left undone.” – Pablo Picasso

  2. “Don’t worry about failures, worry about the chances you miss when you don’t even try.” – Jack Canfield

  3. “You can’t plan for everything or you never get started in the first place.” – Jim Butcher

  4. “Believe you can and you’re halfway there.” – Theodore Roosevelt

  5. “Start before you’re ready.” – Steven Pressfield

  6. “A year from now you may wish you had started today.” – Karen Lamb

  7. “Too many of us are not living our dreams because we are living our fears.” – Les Brown

  8. “Go to the edge of the cliff and jump off. Build your wings on the way down.” – Ray Bradbury

  9. “You don’t have to be good to start … you just have to start to be good!” – Joe Sabah

  10. “If you can dream it, you can do it.” – Walt Disney

  11. “Do not follow where the path may lead. Go instead where there is no path and leave a trail.” – Ralph Waldo Emerson

  12. “You may be disappointed if you fail, but you are doomed if you don’t try.” – Beverly Sills

  13. “You can’t build a reputation on what you are going to do.” – Henry Ford

  14. “The way to get started is to quit talking and begin doing.” – Walt Disney

  15. “The hardest thing about getting started, is getting started.” – Guy Kawasaki

  16. “The secret of getting ahead is getting started.” – Mark Twain

  17. “You can’t wait for inspiration. You have to go after it with a club.” – Jack London

  18. “The greatest amount of wasted time is the time not getting started.” – Dawson Trotman

  19. “Build your own dreams, or someone else will hire you to build theirs.” – Farrah Gray

  20. “Whether you think you can or you think you can’t, you’re right.” – Henry Ford

  21. “If you have a dream, you can spend a lifetime studying, planning, and getting ready for it. What you should be doing is getting started.” – Drew Houston

  22. “The only person you are destined to become is the person you decide to be.” – Ralph Waldo Emerson

  23. “Shoot for the moon. Even if you miss, you’ll land among the stars.” – Les Brown

  24. “Twenty years from now you will be more disappointed by the things that you didn’t do than by the ones you did do.” – Mark Twain

  25. “A journey of a thousand miles must begin with a single step.” – Lao Tsu

  26. “It’s time to start living the life you’ve imagined.” – Henry James

  27. “The beginning is always NOW.” – Roy Bennett

  28. “It is never too late to be what you might have been.” – George Eliot

  29. “All our dreams can come true – if we have the courage to pursue them.” – Walt Disney

  30. “The only thing that stands between you and grand success in living are these two things: getting started and never quitting!” – Robert H. Schuller

  31. “What is not started today is never finished tomorrow.” – Johann Wolfgang von Goethe

  32. “The greatest time wasted, is the time getting started.” – Dawson Trotman

  33. “The vision must be followed by the venture. It is not enough to stare up the steps – we must step up the stairs.” – Vance Havner

  34. “The secret of getting ahead is getting started.” – Sally Berger

  35. “He has half the deed done who has made a beginning.” – Horace

  36. “The distance is nothing; it’s only the first step that is difficult.” – Marquise du Deffand

  37. “We cannot do everything at once, but we can do something at once.” – Calvin Coolidge

Influence others and make your friend

Smile, love
Smile, love

Networking and influencing others are the basic necessities for any business. Without too many contacts and networking it would be almost impossible to grow your business. So are these qualities to increase network of influence learned? Here I have listed some of the best techniques used by world’s renowned leaders.

The very first thing that comes to my mind for winning somebody is Dog. You meet him everyday in your street, the moment you are within 10 feet, he starts waging his tail. If you stop and pat him, he will almost jump out of his skin to show you how much he likes you. And you know very well that behind show of affection on his part, there are no ulterior motives: he does not want to sell you any insurance nor any real estate deal. Have you ever thought that a dog the only animal that does not have to work for living? A hen has to lay eggs, a cow has to give milk. But a dog makes his living by giving you nothing but love. This is the first thing we have to learn is loving others without any strings attached.

The second most important thing is listening others and curiosity to know. When a patient visits to a psychiatrist, the most important job of psychiatrist is to listen. They are paid because of their ability to listen. Everybody wants to say. The cheapest thing you can find is the advice. However, nobody wants to listen. The american telephone company once did a survey to find out which word is used frequently and your guess is correct: its “I”, “I”, “I”. It was used 3900 times in 500 telephone conversation.

If we merely try to impress people and get people interested in us, we will never have many true, sincere friends.

The third important thing to succeed in any business is smile. An insincere grin? No that does not fool anybody. We know it is mechanical and we resent it. Here we are talking about real smile, coming from heart, a kind of smile that that will bring a good price in a market place. There is a far more information in a smile than frown.

The person who knows how to use these three characteristics i.e. love, curiosity to know others and love, are always successful in professional life and personal life.