Jump to content

Install Python on Ubuntu


 Share

Recommended Posts

I am trying to install Python 3.9 on my Ubuntu OS, I try to install Python in the following manner
sudo apt-get install python3.9
after seems installed I tried checking the version:
python -V
However, this input returns:
-bash: python: command not found
It seems like Python versions don't fully install.
Please Help me how can I Install Python On Ubuntu?

Link to comment
Share on other sites

  • Moderators

@satineeraj I just have to ask, why would you join an AutoIt (which works only on Windows) scripting forum, to ask a question about installing Python on Ubuntu?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

34 minutes ago, satineeraj said:

Please Help me how can I Install Python On Ubuntu?

Have you ever tried to simply enter your question "Install Python on Ubuntu" in a search engine of your trust?

One gets various instructions regarding the installation, e.g. install-python-ubuntu

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

sudo apt-get update

before ? :rolleyes:

and check if your OS is up to date:

sudo apt-get upgrade

But you should just install some distrib within Anaconda or MiniConda or w/e exists (might be the 'smartest' choice, as there's not so much people using python without any learning / dataframe toolkit).

Anyway, i thought Python3 was installed by default on Ubuntu now  ...

Edited by 636C65616E
Link to comment
Share on other sites

On 8/17/2021 at 3:35 AM, Earthshine said:

You probably didn’t get the prerequisites 
 

actually download it

Install it and then compile it. This isn’t windows

LOL, OP said Ubuntu not Gentoo :P

And even Gentoo provides automated builds for popular software packages.

--

Anyway, the issue is OP calling python without using any sort of suffix, the newer versions of Ubuntu don't install the default symlink for python3, so you have two choices:

1. Call python3 instead, this approach is recommended because it makes it clear that you have migrated to the new Python.

2. Install the python-is-python3 package which will provide a symlink to python3, now you can call python and all operations will magically redirect to Python 3. You can also do the same trick with Python 2 but it's a bad idea unless you know what you are doing.

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

  • 2 weeks later...

 I face many of the issue when i install the Python on my Ubantu OS, but finally i did this, I Start by updating the packages list and installing the prerequisites: $ sudo apt update $ sudo apt install software-properties-common Next, add the deadsnakes PPA to your sources list: $ sudo add-apt-repository ppa:deadsnakes/ppa Once the repository is enabled, install Python 3.7 with: $ sudo apt install python3.7 Now you can check the version of python using, this post is really help me to Install the Python

Link to comment
Share on other sites

  • 11 months later...
2 hours ago, dailyak77 said:

I'm super new to ubuntu. (like 3 days ago I got my first machine running it.) and need some quick help. I want to install python so I can run code on the machine and I have no idea how to do that.

You should not only read the headline of the thread, but also the already posted answers. Then the following, for example, would have caught your eye ;).

On 8/16/2021 at 5:09 PM, JLogan3o13 said:

I just have to ask, why would you join an AutoIt (which works only on Windows) scripting forum, to ask a question about installing Python on Ubuntu?

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...