How to install python3 on Ubuntu | Setting Up Your Dev Environment

This post will show how to install python3 and pip in Ubuntu 24.04 OS. This post also shows how to overcome the externally managed environment error

$ sudo apt install python3-full python3 python3-pip

If you get this error, 
error: externally-managed-environment, then you need to create a virtual environment for Python and get things done...

Python3
Python3 error

So here is the step to do that
$ python3 -m venv ./pradeep
$ source ./pradeep/bin/activate

activate is common for Ubuntu/Fedora, activate.fish to be used in Arch Linux 

I tried to install a notebook

$ pip install notebook

so whenever you start running python3 and pip, use this command 

$ source ./pradeep/bin/activate

For complete details, watch the following video

Thats it. Subscribe to my channel for more such videos.

My Tech Blog - https://www.nsnam.com/
My Personal webiste - https://www.pradeepkumar.org ​

Comments

Popular posts from this blog

Installing ns3 in Ubuntu 22.04 | Complete Instructions

Installation of NS2 in Ubuntu 22.04 | NS2 Tutorial 2

How to Create Ubuntu 24.04 Bootable USB Using Rufus [Step-by-Step Guide]