{"id":16387,"date":"2024-11-17T17:43:49","date_gmt":"2024-11-17T14:13:49","guid":{"rendered":"https:\/\/www.itpiran.net\/blog\/?p=16387"},"modified":"2024-11-17T17:43:49","modified_gmt":"2024-11-17T14:13:49","slug":"how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server","status":"publish","type":"post","link":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/","title":{"rendered":"How to install Python 3 and set up a programming environment on Ubuntu Server"},"content":{"rendered":"<h2 id=\"%d9%85%d9%82%d8%af%d9%85%d9%87\">Introduction<\/h2>\n<p>The Python programming language is increasingly popular among beginners and professional developers. With its flexibility and versatility, Python is very strong in the areas of scripting, automation, data analysis, machine learning, and back-end development. The language was first released in 1991 and its name is inspired by the British comedy troupe Monty Python. The development team aimed to make Python a programming language that was fun to use.<\/p>\n<p>This tutorial will help you set up a Python 3 development environment on your Ubuntu 22.04 server. Programming on a server has many advantages and supports collaboration on development projects. The general principles of this tutorial can be applied to any Debian Linux distribution.<\/p>\n<h5 id=\"%d9%be%db%8c%d8%b4%d9%86%db%8c%d8%a7%d8%b2%d9%87%d8%a7\">Prerequisites<\/h5>\n<p>To follow this tutorial, you will need a non-root user with sudo privileges on an Ubuntu 22.04 server.<\/p>\n<p>With the server and user set up, you&#039;re ready to get started.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-1-%d8%b1%d8%a7%d9%87%d8%a7%d9%86%d8%af%d8%a7%d8%b2%db%8c-python-3\">Step 1 \u2014 Setting up Python 3<\/h2>\n<p>Ubuntu 22.04 and other Debian Linux versions come with Python 3 installed by default. To ensure that versions are up to date, update your local package list:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apt update<\/code><\/pre>\n<\/div>\n<p>Then update the packages installed on the system to use the latest versions:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apt -y upgrade<\/code><\/pre>\n<\/div>\n<p>The -y flag confirms that you agree to install everything, but depending on your Linux distribution, you may need to confirm additional prompts when updating and upgrading the system.<\/p>\n<p>Once the process is complete, check the version of Python 3 installed on the system by running the following command:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>python3 -V<\/code><\/pre>\n<\/div>\n<p>The output in the terminal window will show you the version number. While this number may vary, the output will be similar to the following:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Python 3.10.4<\/code><\/pre>\n<\/div>\n<p>To manage Python software packages, let&#039;s install pip. Pip is a tool that installs and manages programming packages that we may need in our development projects. To learn more about the modules or packages that you can install with pip, see the article <strong>How to import modules in Python 3<\/strong> Read.<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apt install -y python3-pip<\/code><\/pre>\n<\/div>\n<p>Python packages can be installed with the following command:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>pip3 install package_name<\/code><\/pre>\n<\/div>\n<p>Here <strong>package_name<\/strong> It can refer to any Python package or library, such as Django for web development or NumPy for scientific computing. So if you want to install NumPy, you can do so with the following command:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>pip3 install numpy<\/code><\/pre>\n<\/div>\n<p>Several other packages and development tools should also be installed to ensure you have a robust development environment:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apt install -y build-essential libssl-dev libffi-dev python3-dev<\/code><\/pre>\n<\/div>\n<p>After setting up Python and installing pip and other tools, you can set up a virtual environment for your development projects.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-2-%d8%b1%d8%a7%d9%87%d8%a7%d9%86%d8%af%d8%a7%d8%b2%db%8c-%d9%85%d8%ad%db%8c%d8%b7-%d9%85%d8%ac%d8%a7%d8%b2%db%8c\">Step 2 \u2014 Setting up the virtual environment<\/h2>\n<p>Virtual environments allow you to have an isolated space on your server for Python projects so that each project can have a set of dependencies that won&#039;t interfere with other projects.<\/p>\n<p>Setting up a development environment gives you more control over your Python projects and how you manage different versions of packages. This is especially important when working with third-party packages.<\/p>\n<p>You can set up as many Python programming environments as you want. Each environment is essentially a directory or folder on your server that contains several scripts to make it an environment.<\/p>\n<p>While there are various ways to create a programming environment in Python, here we will use the venv module, which is part of the Python 3 standard library. To install venv, run the following command:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apt install -y python3-venv<\/code><\/pre>\n<\/div>\n<p>With this tool installed, you are ready to create virtual environments. First, you need to choose which directory to place your development environments in, or create a new directory using the mkdir command:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>mkdir environments<\/code><\/pre>\n<\/div>\n<p>Then go to the directory where you will place your development environments:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>cd environments<\/code><\/pre>\n<\/div>\n<p>Once you have navigated to the desired directory, you can create a virtual environment:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>python3 -m venv my_env<\/code><\/pre>\n<\/div>\n<p>In fact, pyvenv creates a new directory with several items in it, which you can view with the ls command:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>ls my_env<\/code><\/pre>\n<\/div>\n<p>The output may be as follows:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>bin include lib lib64 pyvenv.cfg<\/code><\/pre>\n<\/div>\n<p>These files together ensure that your projects are isolated from the rest of the system, preventing system and project files from mixing. This is the best way to control versions and also ensures that each of your projects has access to its own packages.<\/p>\n<p>To use this environment, you need to enable it. Do this by running the following command, which calls the activation script:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>source my_env\/bin\/activate<\/code><\/pre>\n<\/div>\n<p>Your command prompt will now be previewed with the name of your environment. In this example, the environment name is my_env. Depending on your Debian Linux version, the preview may be slightly different, but your environment name in parentheses is the first thing you&#039;ll see on the command line:<\/p>\n<p>This preview informs us that the my_env environment is now active, meaning that when we create applications in this environment, they will only use the settings and packages from that environment.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>Note:<\/strong> Inside the virtual environment you can use the python command instead of python3 and pip instead of pip3 if you prefer. If you are using Python 3 outside the virtual environment, you should use the python3 and pip3 commands exclusively.<\/span><\/p>\n<p>After following these steps, your virtual environment is ready to use.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-3-%d8%a7%db%8c%d8%ac%d8%a7%d8%af-%db%8c%da%a9-%d8%a8%d8%b1%d9%86%d8%a7%d9%85%d9%87-hello-world\">Step 3 \u2014 Create a \u201cHello, World\u201d program\u201d<\/h2>\n<p>Now that we have our virtual environment set up, let&#039;s create a traditional &quot;Hello, World!&quot; program. This program will allow us to test our environment and provide an opportunity to become more familiar with Python.<\/p>\n<p>To do this, open a terminal text editor like nano and create a new file:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>nano hello.py<\/code><\/pre>\n<\/div>\n<p>After the file opens, write the program as follows:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>print(\"Hello, World!\")<\/code><\/pre>\n<\/div>\n<p>Save the file and exit nano. To do this, press CTRL + X, then Y, then ENTER.<\/p>\n<p>After exiting the editor and returning to the shell, you can run the program:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>python hello.py<\/code><\/pre>\n<\/div>\n<p>The hello.py program you created should produce the following output in the terminal:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Hello, World!<\/code><\/pre>\n<\/div>\n<p>To exit the virtual environment, type the deactivate command and you will be returned to your home directory.<\/p>\n<h2 id=\"%d9%86%d8%aa%db%8c%d8%ac%d9%87\">Result<\/h2>\n<p>Now you have a Python 3 development environment set up on your Ubuntu Linux server and can start your coding projects!<\/p>","protected":false},"excerpt":{"rendered":"Introduction The Python programming language is increasingly popular among beginners and professional developers. Python is flexible\u2026","protected":false},"author":1,"featured_media":16388,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"\u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"","_yoast_wpseo_canonical":"","_yoast_wpseo_opengraph-description":"","_yoast_wpseo_opengraph-image":"","_yoast_wpseo_twitter-description":"","_yoast_wpseo_twitter-image":"","_yoast_wpseo_focuskeywords":"","_yoast_wpseo_primary_category":"193","footnotes":""},"categories":[193,363],"tags":[376,368],"class_list":{"0":"post-16387","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-tutorials","8":"category-programming","9":"tag-python","10":"tag-ubuntu"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u067e\u0627\u06cc\u062a\u0648\u0646 3 \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 - \u0628\u0644\u0627\u06af ITPiran<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u067e\u0627\u06cc\u062a\u0648\u0646 3 \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 - \u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"og:description\" content=\"\u0645\u0642\u062f\u0645\u0647 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc Python \u0628\u0647 \u0637\u0648\u0631 \u0641\u0632\u0627\u06cc\u0646\u062f\u0647\u200c\u0627\u06cc \u062f\u0631 \u0628\u06cc\u0646 \u0645\u0628\u062a\u062f\u06cc\u0627\u0646 \u0648 \u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u062d\u0631\u0641\u0647\u200c\u0627\u06cc \u0645\u062d\u0628\u0648\u0628 \u0627\u0633\u062a. Python \u0628\u0627 \u0627\u0646\u0639\u0637\u0627\u0641\u200c\u067e\u0630\u06cc\u0631\u06cc&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-17T14:13:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.itpiran.net\/2024\/11\/17173255\/ubuntu-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1793\" \/>\n\t<meta property=\"og:image:height\" content=\"1110\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\"},\"headline\":\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u067e\u0627\u06cc\u062a\u0648\u0646 3 \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648\",\"datePublished\":\"2024-11-17T14:13:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\\\/\"},\"wordCount\":70,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/11\\\/17173255\\\/ubuntu-1.jpg\",\"keywords\":[\"Python\",\"Ubuntu\"],\"articleSection\":[\"\u0622\u0645\u0648\u0632\u0634\u06cc\",\"\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\\\/\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\\\/\",\"name\":\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u067e\u0627\u06cc\u062a\u0648\u0646 3 \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 - \u0628\u0644\u0627\u06af ITPiran\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/11\\\/17173255\\\/ubuntu-1.jpg\",\"datePublished\":\"2024-11-17T14:13:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\\\/#primaryimage\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/11\\\/17173255\\\/ubuntu-1.jpg\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/11\\\/17173255\\\/ubuntu-1.jpg\",\"width\":1793,\"height\":1110},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u0622\u0645\u0648\u0632\u0634\u06cc\",\"item\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/category\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u067e\u0627\u06cc\u062a\u0648\u0646 3 \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\",\"name\":\"\u0628\u0644\u0627\u06af ITPiran\",\"description\":\"\u0627\u062e\u0628\u0627\u0631 \u0648 \u0645\u0642\u0627\u0644\u0627\u062a \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\",\"name\":\"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\",\"alternateName\":\"ITPIran Blog\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2023\\\/12\\\/27150508\\\/cropped-ITPIRAN-BLOG-LOGO-2.png\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2023\\\/12\\\/27150508\\\/cropped-ITPIRAN-BLOG-LOGO-2.png\",\"width\":512,\"height\":512,\"caption\":\"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\",\"name\":\"admin\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/en\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to install Python 3 and set up a programming environment on Ubuntu Server - ITPiran Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/","og_locale":"en_US","og_type":"article","og_title":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u067e\u0627\u06cc\u062a\u0648\u0646 3 \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 - \u0628\u0644\u0627\u06af ITPiran","og_description":"\u0645\u0642\u062f\u0645\u0647 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc Python \u0628\u0647 \u0637\u0648\u0631 \u0641\u0632\u0627\u06cc\u0646\u062f\u0647\u200c\u0627\u06cc \u062f\u0631 \u0628\u06cc\u0646 \u0645\u0628\u062a\u062f\u06cc\u0627\u0646 \u0648 \u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u062d\u0631\u0641\u0647\u200c\u0627\u06cc \u0645\u062d\u0628\u0648\u0628 \u0627\u0633\u062a. Python \u0628\u0627 \u0627\u0646\u0639\u0637\u0627\u0641\u200c\u067e\u0630\u06cc\u0631\u06cc&hellip;","og_url":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/","og_site_name":"\u0628\u0644\u0627\u06af ITPiran","article_published_time":"2024-11-17T14:13:49+00:00","og_image":[{"width":1793,"height":1110,"url":"https:\/\/cdn.itpiran.net\/2024\/11\/17173255\/ubuntu-1.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/#article","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/"},"author":{"name":"admin","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81"},"headline":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u067e\u0627\u06cc\u062a\u0648\u0646 3 \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648","datePublished":"2024-11-17T14:13:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/"},"wordCount":70,"commentCount":0,"publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/11\/17173255\/ubuntu-1.jpg","keywords":["Python","Ubuntu"],"articleSection":["\u0622\u0645\u0648\u0632\u0634\u06cc","\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/","url":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/","name":"How to install Python 3 and set up a programming environment on Ubuntu Server - ITPiran Blog","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/#primaryimage"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/11\/17173255\/ubuntu-1.jpg","datePublished":"2024-11-17T14:13:49+00:00","breadcrumb":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/#primaryimage","url":"https:\/\/cdn.itpiran.net\/2024\/11\/17173255\/ubuntu-1.jpg","contentUrl":"https:\/\/cdn.itpiran.net\/2024\/11\/17173255\/ubuntu-1.jpg","width":1793,"height":1110},{"@type":"BreadcrumbList","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-22-04-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.itpiran.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u0622\u0645\u0648\u0632\u0634\u06cc","item":"https:\/\/www.itpiran.net\/blog\/category\/tutorials\/"},{"@type":"ListItem","position":3,"name":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u067e\u0627\u06cc\u062a\u0648\u0646 3 \u0648 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648"}]},{"@type":"WebSite","@id":"https:\/\/www.itpiran.net\/blog\/#website","url":"https:\/\/www.itpiran.net\/blog\/","name":"ITPiran Blog","description":"Iranian Sustainable Trade News and Articles","publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.itpiran.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.itpiran.net\/blog\/#organization","name":"Sustainable Iranian Business Blog","alternateName":"ITPIran Blog","url":"https:\/\/www.itpiran.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdn.itpiran.net\/2023\/12\/27150508\/cropped-ITPIRAN-BLOG-LOGO-2.png","contentUrl":"https:\/\/cdn.itpiran.net\/2023\/12\/27150508\/cropped-ITPIRAN-BLOG-LOGO-2.png","width":512,"height":512,"caption":"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81","name":"admin","url":"https:\/\/www.itpiran.net\/blog\/en\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/16387","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/comments?post=16387"}],"version-history":[{"count":2,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/16387\/revisions"}],"predecessor-version":[{"id":16390,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/16387\/revisions\/16390"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/media\/16388"}],"wp:attachment":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/media?parent=16387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/categories?post=16387"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/tags?post=16387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}