
sudo add-apt-repository ppa:deadsnakes/ppa 2.

Add the following lines: echo 'eval "$(pyenv init -path)"' > ~/.zprofileĮcho 'eval "$(pyenv init -)"' > ~/. Option 1: Install Python 3 Using apt (Easier) Step 1: Update and Refresh Repository Lists. Open up a terminal, and add the PPA Deadsnakes as shown below. Open Terminal, then type in: brew install openssl readline sqlite3 xz zlibįinally, update the shell profile configuration, i.e ~/.zshrc if your default shell is ZSH. To make pyenv work, install build dependencies through Homebrew. The Homebrew Python documentation recommends pyenv to manage Python environments. You lose control over “site-packages” and all the PIP packages that you had installed might become inaccessible. For example, the "youtube-dl" package uses Python as its dependency, the Python package may get updated as and when needed.


#Sudo apt install python how to
Installing Python 3.8 on Ubuntu from Source In this section, we’ll explain how to compile Python 3.8 from the source. Many people prefer to use Homebrew to install software packages, but should you use it for Python development? The problem with using Homebrew Python is that it’s not in your control. sudo apt install python3.8 Verify that the installation was successful by typing: python3.8 -version Python 3.8.0 At this point, Python 3.8 is installed on your Ubuntu system, and you can start using it. If you’re working on multiple Python projects, the default location, which needs sudo privileges, creates hurdles.
